From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6092B445325 for ; Wed, 22 Jul 2020 18:35:01 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id i80so1543900lfi.13 for ; Wed, 22 Jul 2020 08:35:01 -0700 (PDT) From: Cyrill Gorcunov Date: Wed, 22 Jul 2020 18:33:59 +0300 Message-Id: <20200722153359.134718-6-gorcunov@gmail.com> In-Reply-To: <20200722153359.134718-1-gorcunov@gmail.com> References: <20200722153359.134718-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 5/5] qsync: fix release build List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy We use txn for debug purpose only so it triggers unused variable issue in release build. Signed-off-by: Cyrill Gorcunov --- src/box/txn_limbo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index de043f53d..9c12f4fa6 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -167,13 +167,13 @@ txn_limbo_write_rollback(struct txn_limbo *limbo, int64_t lsn); int txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry) { - struct txn *txn = entry->txn; assert(entry->lsn > 0 || !txn_has_flag(entry->txn, TXN_WAIT_ACK)); if (txn_limbo_entry_is_complete(entry)) goto complete; - assert(!txn_has_flag(txn, TXN_IS_DONE)); - assert(txn_has_flag(txn, TXN_WAIT_SYNC)); + assert(!txn_has_flag(entry->txn, TXN_IS_DONE)); + assert(txn_has_flag(entry->txn, TXN_WAIT_SYNC)); + double start_time = fiber_clock(); while (true) { double deadline = start_time + replication_synchro_timeout; @@ -229,7 +229,7 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry) * installed the commit/rollback flag. */ assert(rlist_empty(&entry->in_queue)); - assert(txn_has_flag(txn, TXN_IS_DONE)); + assert(txn_has_flag(entry->txn, TXN_IS_DONE)); /* * The first tx to be rolled back already performed all * the necessary cleanups for us. -- 2.26.2