Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH v9 5/6] box: introduce offset_slot cache in key_part
Date: Mon, 4 Feb 2019 15:56:03 +0300	[thread overview]
Message-ID: <20190204125603.yi3ybmvwif2pki6d@esperanza> (raw)
In-Reply-To: <709ad0bac8976ed78bcf0ce418567b2e3a378a77.1549187339.git.kshcherbatov@tarantool.org>

On Sun, Feb 03, 2019 at 01:20:25PM +0300, Kirill Shcherbatov wrote:
> diff --git a/src/box/tuple_format.c b/src/box/tuple_format.c
> index d9c408495..fc152cbbc 100644
> --- a/src/box/tuple_format.c
> +++ b/src/box/tuple_format.c
> @@ -41,6 +41,7 @@ struct tuple_format **tuple_formats;
>  static intptr_t recycled_format_ids = FORMAT_ID_NIL;
>  
>  static uint32_t formats_size = 0, formats_capacity = 0;
> +static uint64_t formats_epoch = 0;
>  
>  /**
>   * Find in format1::fields the field by format2_field's JSON path.
> @@ -623,6 +624,7 @@ tuple_format_alloc(struct key_def * const *keys, uint16_t key_count,
>  	format->index_field_count = index_field_count;
>  	format->exact_field_count = 0;
>  	format->min_field_count = 0;
> +	format->epoch = 0;
>  	return format;
>  error:
>  	tuple_format_destroy_fields(format);
> @@ -672,6 +674,7 @@ tuple_format_reuse(struct tuple_format **p_format)
>  		tuple_format_destroy(format);
>  		free(format);
>  		*p_format = *entry;
> +		(*p_format)->epoch = ++formats_epoch;

Why? Can I remove it?

>  		return true;
>  	}
>  	return false;
> @@ -740,6 +743,7 @@ tuple_format_new(struct tuple_format_vtab *vtab, void *engine,
>  		goto err;
>  	if (tuple_format_reuse(&format))
>  		return format;
> +	format->epoch = ++formats_epoch;

Can I move it above the call to tuple_format_create, where other
tuple_format fields are initialized?

  reply	other threads:[~2019-02-04 12:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-03 10:20 [PATCH v9 0/6] box: Indexes by JSON path Kirill Shcherbatov
2019-02-03 10:20 ` [PATCH v9 1/6] lib: update msgpuck library Kirill Shcherbatov
2019-02-04  9:48   ` Vladimir Davydov
2019-02-03 10:20 ` [PATCH v9 2/6] box: introduce tuple_field_raw_by_path routine Kirill Shcherbatov
2019-02-04 10:37   ` Vladimir Davydov
2019-02-03 10:20 ` [PATCH v9 3/6] box: introduce JSON Indexes Kirill Shcherbatov
2019-02-04 12:26   ` Vladimir Davydov
2019-02-03 10:20 ` [PATCH v9 4/6] box: introduce has_json_paths flag in templates Kirill Shcherbatov
2019-02-04 12:31   ` Vladimir Davydov
2019-02-03 10:20 ` [PATCH v9 5/6] box: introduce offset_slot cache in key_part Kirill Shcherbatov
2019-02-04 12:56   ` Vladimir Davydov [this message]
2019-02-04 13:02     ` [tarantool-patches] " Kirill Shcherbatov
2019-02-04 15:10   ` Vladimir Davydov
2019-02-03 10:20 ` [PATCH v9 6/6] box: specify indexes in user-friendly form Kirill Shcherbatov
2019-02-04 15:30   ` Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204125603.yi3ybmvwif2pki6d@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH v9 5/6] box: introduce offset_slot cache in key_part' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox