From: Nikita Pettik <korablev@tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v3 1/2] box: speed up tuple_field_map_create
Date: Fri, 11 Dec 2020 14:32:53 +0000 [thread overview]
Message-ID: <20201211143253.GE12730@tarantool.org> (raw)
In-Reply-To: <ce93e991-d108-cb37-fc2a-ad71f50afdfc@tarantool.org>
On 11 Dec 09:34, Serge Petrenko wrote:
>
> 10.12.2020 20:17, Nikita Pettik пишет:
>
> > I'd rewrite this part as:
> >
> > diff --git a/src/box/tuple_format.c b/src/box/tuple_format.c
> > index 6c9b2a255..d6655256a 100644
> > --- a/src/box/tuple_format.c
> > +++ b/src/box/tuple_format.c
> > @@ -912,10 +912,12 @@ tuple_field_map_create_plain(struct tuple_format *format, const char *tuple,
> > }
> > end:
> > - return validate ?
> > - tuple_format_required_fields_validate(format, required_fields,
> > - required_fields_sz) :
> > - 0;
> > + if (validate) {
> > + return tuple_format_required_fields_validate(format,
> > + required_fields,
> > + required_fields_sz);
> > + }
> > + return 0;
> > }
> >
> > Up to you. Anyway LGTM
>
> Hm, what about this? Applied.
>
> diff --git a/src/box/tuple_format.c b/src/box/tuple_format.c
> index 6c9b2a255..5f5e833b4 100644
> --- a/src/box/tuple_format.c
> +++ b/src/box/tuple_format.c
> @@ -912,10 +912,11 @@ tuple_field_map_create_plain(struct tuple_format
> *format, const char *tuple,
> }
>
> end:
> - return validate ?
> - tuple_format_required_fields_validate(format,
> required_fields,
> - required_fields_sz) :
> - 0;
> + if (!validate)
> + return 0;
> +
> + return tuple_format_required_fields_validate(format,
> required_fields,
> + required_fields_sz);
Fine, thx.
> }
>
> /** @sa declaration for details. */
>
> >
> > > +end:
> > > + return validate ?
> > > + tuple_format_required_fields_validate(format, required_fields,
> > > + required_fields_sz) :
> > > + 0;
> > > +}
> > > +
>
> --
> Serge Petrenko
>
next prev parent reply other threads:[~2020-12-11 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 9:52 [Tarantool-patches] [PATCH v3 0/2] reduce performance degradation introduced by JSON path indices Serge Petrenko
2020-12-04 9:52 ` [Tarantool-patches] [PATCH v3 1/2] box: speed up tuple_field_map_create Serge Petrenko
2020-12-10 17:17 ` Nikita Pettik
2020-12-11 6:34 ` Serge Petrenko
2020-12-11 14:32 ` Nikita Pettik [this message]
2020-12-04 9:52 ` [Tarantool-patches] [PATCH v3 2/2] box: refactor tuple_field_raw to omit path checks Serge Petrenko
2020-12-10 17:25 ` Nikita Pettik
2020-12-11 6:36 ` Serge Petrenko
2020-12-10 17:35 ` [Tarantool-patches] [PATCH v3 0/2] reduce performance degradation introduced by JSON path indices Nikita Pettik
2020-12-11 6:47 ` Serge Petrenko
2020-12-11 13:39 ` Alexander V. Tikhonov
2020-12-11 14:51 ` Nikita Pettik
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=20201211143253.GE12730@tarantool.org \
--to=korablev@tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v3 1/2] box: speed up tuple_field_map_create' \
/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