From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 21FC6445320 for ; Fri, 10 Jul 2020 23:33:35 +0300 (MSK) References: <20200710075605.217824-1-gorcunov@gmail.com> <20200710075605.217824-3-gorcunov@gmail.com> From: Vladislav Shpilevoy Message-ID: <5040e7f2-6222-98d2-f058-4b2e903e758d@tarantool.org> Date: Fri, 10 Jul 2020 22:33:33 +0200 MIME-Version: 1.0 In-Reply-To: <20200710075605.217824-3-gorcunov@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [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: Cyrill Gorcunov , tml On 10/07/2020 09:56, Cyrill Gorcunov wrote: > 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); > } > } The comment is correct, but it is useless, sorry. You just narrate what TXN_FORCE_ASYNC means. I don't see a point in narrative comments. The code is self-explanatory already. Я понимаю, что ты так в коде разбираешься, меняя его по чуть-чуть, но плиз, постарайся сократить кол-во таких изменений. Они вообще ничего не привносят кроме того, что историю затирают, и вызывают споры вроде этого.