From: Serge Petrenko <sergepetrenko@tarantool.org>
To: Nikita Pettik <korablev@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 09:34:05 +0300 [thread overview]
Message-ID: <ce93e991-d108-cb37-fc2a-ad71f50afdfc@tarantool.org> (raw)
In-Reply-To: <20201210171702.GC1319@tarantool.org>
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);
}
/** @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 6:34 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 [this message]
2020-12-11 14:32 ` Nikita Pettik
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=ce93e991-d108-cb37-fc2a-ad71f50afdfc@tarantool.org \
--to=sergepetrenko@tarantool.org \
--cc=korablev@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