[PATCH v8 4/5] box: introduce offset_slot cache in key_part

Vladimir Davydov vdavydov.dev at gmail.com
Wed Jan 23 17:23:25 MSK 2019


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;



More information about the Tarantool-patches mailing list