From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1C75D2802D for ; Thu, 23 May 2019 04:21:37 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ssYKIZqGTJrv for ; Thu, 23 May 2019 04:21:36 -0400 (EDT) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 9A7322F288 for ; Thu, 23 May 2019 04:19:45 -0400 (EDT) From: Georgy Kirichenko Subject: [tarantool-patches] [PATCH v2 5/8] Commit engine before all triggers Date: Thu, 23 May 2019 11:19:37 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Georgy Kirichenko --- src/box/txn.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index f677e1d33..273964d51 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -397,6 +397,13 @@ txn_commit(struct txn *txn) if (txn->signature < 0) return -1; } + /* + * Engine can be NULL if transaction contains IPROTO_NOP + * statements only. + */ + if (txn->engine != NULL) + engine_commit(txn->engine, txn); + /* * The transaction is in the binary log. No action below * may throw. In case an error has happened, there is @@ -408,13 +415,6 @@ txn_commit(struct txn *txn) unreachable(); panic("commit trigger failed"); } - /* - * Engine can be NULL if transaction contains IPROTO_NOP - * statements only. - */ - if (txn->engine != NULL) - engine_commit(txn->engine, txn); - struct txn_stmt *stmt; stailq_foreach_entry(stmt, &txn->stmts, next) txn_stmt_unref_tuples(stmt); -- 2.21.0