From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 23 Jan 2019 17:23:25 +0300 From: Vladimir Davydov Subject: Re: [PATCH v8 4/5] box: introduce offset_slot cache in key_part Message-ID: <20190123142325.dvszwkibwwkxa6tz@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org, kostja@tarantool.org List-ID: On Wed, Jan 16, 2019 at 04:44:42PM +0300, Kirill Shcherbatov wrote: > diff --git a/src/box/key_def.h b/src/box/key_def.h > index fe4acffb5..7a71ed060 100644 > --- a/src/box/key_def.h > +++ b/src/box/key_def.h > @@ -97,6 +97,20 @@ struct key_part { > char *path; > /** The length of JSON path. */ > uint32_t path_len; > + /** > + * Epoch of the tuple format the offset slot cached in > + * this part is valid for, see tuple_format::epoch. > + */ > + uint64_t format_epoch; > + /** > + * Cached value of the offset slot corresponding to > + * the indexed field (tuple_field::offset_slot). > + * Valid only if key_def::epoch equals the epoch of key_def::format_epoch > + * the tuple format. This value is updated in > + * tuple_field_by_part_raw to always store the > + * offset corresponding to the last used tuple format. > + */ > + int32_t offset_slot_cache; > }; > > struct key_def;