From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1347A445320 for ; Mon, 13 Jul 2020 21:34:46 +0300 (MSK) References: <1594649887-15890-1-git-send-email-alyapunov@tarantool.org> <1594649887-15890-4-git-send-email-alyapunov@tarantool.org> From: Vladislav Shpilevoy Message-ID: <3de929ed-856a-679f-9790-dde386697fe5@tarantool.org> Date: Mon, 13 Jul 2020 20:34:44 +0200 MIME-Version: 1.0 In-Reply-To: <1594649887-15890-4-git-send-email-alyapunov@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 3/3] alter: do not catch exceptions when it's not necessary List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov , tarantool-patches@dev.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?