From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH 1/4] Pass necessary fields to tuple_format contructor
Date: Wed, 23 Jan 2019 10:53:02 +0300 [thread overview]
Message-ID: <20190123075302.ef6gyhwhh2ud23zr@esperanza> (raw)
In-Reply-To: <8c3d49689175993d54b50c01e11b37511befdc5e.1548165435.git.kyukhin@tarantool.org>
On Tue, Jan 22, 2019 at 05:07:17PM +0300, Kirill Yukhin wrote:
> diff --git a/src/box/tuple_format.c b/src/box/tuple_format.c
> index e11b4e6..6edc0fb 100644
> --- a/src/box/tuple_format.c
> +++ b/src/box/tuple_format.c
> @@ -398,17 +398,20 @@ tuple_format_delete(struct tuple_format *format)
> }
>
> struct tuple_format *
> -tuple_format_new(struct tuple_format_vtab *vtab, struct key_def * const *keys,
> - uint16_t key_count, const struct field_def *space_fields,
> - uint32_t space_field_count, struct tuple_dictionary *dict)
> +tuple_format_new(struct tuple_format_vtab *vtab, void *engine,
> + struct key_def * const *keys, uint16_t key_count,
> + const struct field_def *space_fields,
> + uint32_t space_field_count, struct tuple_dictionary *dict,
> + bool is_temporary, uint32_t exact_field_count)
Nit: I think we should rearrange the arguments a little:
vtab, engine, keys, key_count,
fields, field_count, exact_field_count,
dict, is_temporary, is_ephemeral
> diff --git a/src/box/tuple_format.h b/src/box/tuple_format.h
> index 30b93b6..9778fda 100644
> --- a/src/box/tuple_format.h
> +++ b/src/box/tuple_format.h
> @@ -258,18 +258,23 @@ tuple_format_unref(struct tuple_format *format)
> /**
> * Allocate, construct and register a new in-memory tuple format.
> * @param vtab Virtual function table for specific engines.
> + * @param engine Pointer to storage engine.
> * @param keys Array of key_defs of a space.
> * @param key_count The number of keys in @a keys array.
> * @param space_fields Array of fields, defined in a space format.
> * @param space_field_count Length of @a space_fields.
> + * @param is_temporary Set if format is temporary.
Nit: The format isn't temporary. The space that this format
is created for is.
> diff --git a/src/box/vinyl.c b/src/box/vinyl.c
> index d6117f4..abae076 100644
> --- a/src/box/vinyl.c
> +++ b/src/box/vinyl.c
> @@ -619,13 +619,14 @@ vinyl_engine_create_space(struct engine *engine, struct space_def *def,
> keys[key_count++] = index_def->key_def;
>
> struct tuple_format *format =
> - tuple_format_new(&vy_tuple_format_vtab, keys, key_count,
> - def->fields, def->field_count, def->dict);
> + tuple_format_new(&vy_tuple_format_vtab, NULL, keys,
> + key_count,
Nit: This short line surrounded by long ones doesn't look good.
> + def->fields, def->field_count, def->dict,
> + false, def->exact_field_count);
next prev parent reply other threads:[~2019-01-23 7:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 14:07 [PATCH 0/4] Reuse tuple formats for ephemeral spaces Kirill Yukhin
2019-01-22 14:07 ` Kirill Yukhin
2019-01-22 14:07 ` [PATCH 1/4] Pass necessary fields to tuple_format contructor Kirill Yukhin
2019-01-23 7:53 ` Vladimir Davydov [this message]
2019-01-24 8:13 ` Kirill Yukhin
2019-01-22 14:07 ` [PATCH 2/4] Set is_temporary flag for formats of ephemeral spaces Kirill Yukhin
2019-01-23 8:00 ` Vladimir Davydov
2019-01-24 8:53 ` Kirill Yukhin
2019-01-22 14:07 ` [PATCH 3/4] sql: set error type in case of ephemral space creation failure Kirill Yukhin
2019-01-23 8:00 ` Vladimir Davydov
2019-01-22 14:07 ` [PATCH 4/4] Allow to reuse tuple_formats for ephemeral spaces Kirill Yukhin
2019-01-23 8:38 ` Vladimir Davydov
2019-01-24 12:39 ` Kirill Yukhin
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=20190123075302.ef6gyhwhh2ud23zr@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [PATCH 1/4] Pass necessary fields to tuple_format contructor' \
/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