[Tarantool-patches] [PATCH 2/5] qsync: add a comment about sync txn in journal allocation

Cyrill Gorcunov gorcunov at gmail.com
Fri Jul 10 10:56:02 MSK 2020


Otherwise it is not clear why we should setup a flag here.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 src/box/txn.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/box/txn.c b/src/box/txn.c
index 49b2b2649..4251b2092 100644
--- a/src/box/txn.c
+++ b/src/box/txn.c
@@ -591,6 +591,13 @@ txn_journal_entry_new(struct txn *txn)
 			txn_set_flag(txn, TXN_WAIT_SYNC);
 			txn_set_flag(txn, TXN_WAIT_ACK);
 		} else if (!txn_limbo_is_empty(&txn_limbo)) {
+			/*
+			 * There some sync entries on the
+			 * fly thus wait for their completion
+			 * even if this particular transaction
+			 * doesn't touch sync space (each sync txn
+			 * should be considered as a barrier).
+			 */
 			txn_set_flag(txn, TXN_WAIT_SYNC);
 		}
 	}
-- 
2.26.2



More information about the Tarantool-patches mailing list