[Tarantool-patches] [PATCH v2 3/3] alter: do not catch exceptions when it's not necessary

Aleksandr Lyapunov alyapunov at tarantool.org
Mon Jul 13 17:18:07 MSK 2020


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



More information about the Tarantool-patches mailing list