From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 3C52C445323 for ; Mon, 13 Jul 2020 17:18:43 +0300 (MSK) From: Aleksandr Lyapunov Date: Mon, 13 Jul 2020 17:18:07 +0300 Message-Id: <1594649887-15890-4-git-send-email-alyapunov@tarantool.org> In-Reply-To: <1594649887-15890-1-git-send-email-alyapunov@tarantool.org> References: <1594649887-15890-1-git-send-email-alyapunov@tarantool.org> Subject: [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: tarantool-patches@dev.tarantool.org Cc: v.shpilevoy@tarantool.org 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); -- 2.7.4