[server 3/4] iproto: add IPROTO_NOP request type

Konstantin Osipov kostja at tarantool.org
Mon Jan 29 22:07:49 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [18/01/26 14:27]:
> > > index e1192e91..94b111ad 100644
> > > --- a/src/box/iproto_constants.h
> > > +++ b/src/box/iproto_constants.h
> > > @@ -141,6 +141,8 @@ enum iproto_type {
> > >  	IPROTO_UPSERT = 9,
> > >  	/** CALL request - returns arbitrary MessagePack */
> > >  	IPROTO_CALL = 10,
> > > +	/** No operation. Treated as DML, used to bump LSN. */
> > > +	IPROTO_NOP = 11,
> > >  	/** The maximum typecode used for box.stat() */
> > >  	IPROTO_TYPE_STAT_MAX,
> > 
> > I thought we agreed to keep IPROTO_TYPE_STAT_MAX at 10 and
> > introduce a different constant for iproto_type_name(), something
> > like IRPOTO_TYPE_NAME_MAX?
> 
> I tried, it didn't work out. The problem is rmean_collect() wouldn't
> work for IPROTO_NOP and we would have to add some ifs here and there.

I pushed the patch but I think you need to spend some time to fix
the problem at src/box/lua/stat.c or level, or with rmean.c
implementation. 
Another option: struct stats in rmean gets an option for whether a
stat is visible or not. Perhaps we need a hash in rmean, to speed
up index lookup.

While looking at this code, please think how much time it would
take to speed up stat aging overhead and speed up the aging
process while reducing the stat window.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.org - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list