From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (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 F2350445321 for ; Fri, 10 Jul 2020 10:56:35 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id u25so2694338lfm.1 for ; Fri, 10 Jul 2020 00:56:35 -0700 (PDT) From: Cyrill Gorcunov Date: Fri, 10 Jul 2020 10:56:02 +0300 Message-Id: <20200710075605.217824-3-gorcunov@gmail.com> In-Reply-To: <20200710075605.217824-1-gorcunov@gmail.com> References: <20200710075605.217824-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/5] qsync: add a comment about sync txn in journal allocation List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy Otherwise it is not clear why we should setup a flag here. Signed-off-by: Cyrill Gorcunov --- 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