[Tarantool-patches] [PATCH v2 04/19] replication: make sync transactions wait quorum

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jul 5 19:05:35 MSK 2020


Applied this diff:

====================
diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index 2b4aae477..13cef540f 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -124,10 +124,11 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
 {
 	struct txn *txn = entry->txn;
 	assert(entry->lsn > 0);
-	assert(!txn_has_flag(txn, TXN_IS_DONE));
-	assert(txn_has_flag(txn, TXN_WAIT_SYNC));
 	if (txn_limbo_check_complete(limbo, entry))
 		goto complete;
+
+	assert(!txn_has_flag(txn, TXN_IS_DONE));
+	assert(txn_has_flag(txn, TXN_WAIT_SYNC));
 	bool cancellable = fiber_set_cancellable(false);
 	while (!txn_limbo_entry_is_complete(entry))
 		fiber_yield();

====================

Because if a transaction is already complete, it will have
IS_DONE and won't have WAIT_SYNC.


More information about the Tarantool-patches mailing list