From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Aleksandr Lyapunov <alyapunov@tarantool.org>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 3/3] alter: do not catch exceptions when it's not necessary
Date: Mon, 13 Jul 2020 20:34:44 +0200 [thread overview]
Message-ID: <3de929ed-856a-679f-9790-dde386697fe5@tarantool.org> (raw)
In-Reply-To: <1594649887-15890-4-git-send-email-alyapunov@tarantool.org>
On 13.07.2020 16:18, Aleksandr Lyapunov wrote:
> Some method are guarantee to be noexcept, we should not try them.
>
> Closes #5153
> ---
> src/box/alter.cc | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/src/box/alter.cc b/src/box/alter.cc
> index 9b2b8e8..1807c33 100644
> --- a/src/box/alter.cc
> +++ b/src/box/alter.cc
> @@ -1030,12 +1030,8 @@ alter_space_rollback(struct trigger *trigger, void * /* event */) noexcept
> struct alter_space *alter = (struct alter_space *) trigger->data;
> /* Rollback alter ops */
> class AlterSpaceOp *op;
> - try {
> - rlist_foreach_entry(op, &alter->ops, link) {
> - op->rollback(alter);
> - }
> - } catch (Exception *e) {
> - return -1;
> + rlist_foreach_entry(op, &alter->ops, link) {
> + op->rollback(alter);
> }
> /* Rebuild index maps once for all indexes. */
> space_fill_index_map(alter->old_space);
My comment to the previous version still remains:
1. This one is good. Try-catch wasn't needed here. But it looks like related to
the previous commit. Not to this one.
You did exactly the same change for on_commit triggers in
the first commit. Why did you move on_rollback change into a
separate commit?
prev parent reply other threads:[~2020-07-13 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 14:18 [Tarantool-patches] [PATCH v2 0/3] Simplify alter.cc Aleksandr Lyapunov
2020-07-13 14:18 ` [Tarantool-patches] [PATCH v2 1/3] alter: use good c++ style Aleksandr Lyapunov
2020-08-04 9:55 ` Ilya Kosarev
2020-08-04 10:04 ` Ilya Kosarev
2020-07-13 14:18 ` [Tarantool-patches] [PATCH v2 2/3] alter: fix codestyle Aleksandr Lyapunov
2020-08-04 10:10 ` Ilya Kosarev
2020-07-13 14:18 ` [Tarantool-patches] [PATCH v2 3/3] alter: do not catch exceptions when it's not necessary Aleksandr Lyapunov
2020-07-13 18:34 ` Vladislav Shpilevoy [this message]
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=3de929ed-856a-679f-9790-dde386697fe5@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=alyapunov@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 3/3] alter: do not catch exceptions when it'\''s not necessary' \
/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