Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [Tarantool-patches] [PATCH 5/5] qsync: fix release build
Date: Wed, 22 Jul 2020 18:33:59 +0300	[thread overview]
Message-ID: <20200722153359.134718-6-gorcunov@gmail.com> (raw)
In-Reply-To: <20200722153359.134718-1-gorcunov@gmail.com>

We use txn for debug purpose only so it
triggers unused variable issue in release
build.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 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

  parent reply	other threads:[~2020-07-22 15:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 15:33 [Tarantool-patches] [PATCH 0/5] qsync: write confirm/rollback without txn engine Cyrill Gorcunov
2020-07-22 15:33 ` [Tarantool-patches] [PATCH 1/5] journal: drop redundant declaration Cyrill Gorcunov
2020-07-22 15:33 ` [Tarantool-patches] [PATCH 2/5] wal: bind asynchronous write completion to an entry Cyrill Gorcunov
2020-07-22 15:33 ` [Tarantool-patches] [PATCH 3/5] journal: add journal_entry_create helper Cyrill Gorcunov
2020-07-22 15:33 ` [Tarantool-patches] [PATCH 4/5] qsync: implement direct write of confirm/rollback into a journal Cyrill Gorcunov
2020-07-22 15:41   ` Cyrill Gorcunov
2020-07-22 15:33 ` Cyrill Gorcunov [this message]
2020-07-23 11:41 ` [Tarantool-patches] [PATCH 0/5] qsync: write confirm/rollback without txn engine Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200722153359.134718-6-gorcunov@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 5/5] qsync: fix release build' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox