From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id CBEDA6FC86; Sun, 25 Apr 2021 11:11:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CBEDA6FC86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619338290; bh=8LKHzTqUarKWI5VJm8VyGIhDHoahha0FyoIJFeQTv3E=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qnoWUrvCcbS/wAIj6mwkmhjrghmwN/9StciGWkEySMnHjf8+KLGfQtNkT+BmupOig fFEmRx66twZ0WI514NaS+z+Q3wPwb6/utWPSbtXDOF3i37BDQrzUjkrSJ+j42drjcq 0VM98dQiuksacTDa9U+7mWgZ2rb0qMY+803E0Pcg= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 BBB736FC86 for ; Sun, 25 Apr 2021 11:11:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BBB736FC86 Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1laZrU-0003iZ-U1; Sun, 25 Apr 2021 11:11:29 +0300 To: Cyrill Gorcunov , tml References: <20210419083719.29689-1-gorcunov@gmail.com> <20210419083719.29689-4-gorcunov@gmail.com> Message-ID: <40bda731-bd03-8769-e843-8373246fadcf@tarantool.org> Date: Sun, 25 Apr 2021 11:11:28 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210419083719.29689-4-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9203E2ABA940B7548CA3406377FA04A72641288DF385C0094182A05F53808504016733609AC7DF364DAB37B7092CB3A8F8F4586BFD3798DC208A4E9568B0E0E81 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EA4B66823129EB3CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BBCE7257090F96C9EA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA65817438B97D0A83BE44C0662564C641B9AF6B57BC7E64490618DEB871D839B73339E8FC8737B5C22498CC5112E3E56BCDBCC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0998E19D2343267C68941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD2691661749BA6B97735362A9E1C46FBA09C7B076A6E789B0E97A8DF7F3B2552694A1E7802607F20496D49FD398EE364050FB28585415E75ADA986750DBF4DC650F2B3661434B16C20AC78D18283394535A9E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BBFD80D3C1F6BEDE875ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A54F87CEEB6276121D9B59431A25E20F62FFF2713DDA0AE6CED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D342F9EE325F82A28A81F24805438FA3D59DC8135334B0B841768B7D911B61FC9F8B83FE4903A4ECE4C1D7E09C32AA3244C5304C9BC45DDF5335C8ED8C4AB1C532033C9DC155518937F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj08M52wfuxcEOLLiQBLuH2Q== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8CB5DDA919824394B672917AF179ED1283805A40439309D01424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 3/3] txn_limbo: simplify txn_limbo_ack X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 19.04.2021 11:37, Cyrill Gorcunov пишет: > There is no need to test @confirm_lsn at all because > even with value -1 we're to continue iterating the queue. > Lets drop it and save a branch. > > I keep "continue" here to be consistent with other "if"s. > > Signed-off-by: Cyrill Gorcunov > --- > src/box/txn_limbo.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c > index 2a10bd0ae..227b74764 100644 > --- a/src/box/txn_limbo.c > +++ b/src/box/txn_limbo.c > @@ -505,8 +505,7 @@ txn_limbo_ack(struct txn_limbo *limbo, uint32_t replica_id, int64_t lsn) > */ > if (!txn_has_flag(e->txn, TXN_WAIT_ACK)) { > assert(e->lsn == -1); > - if (confirm_lsn == -1) > - continue; > + continue; > } else if (e->lsn <= prev_lsn) { > continue; > } else if (++e->ack_count < replication_synchro_quorum) { Thanks! LGTM. -- Serge Petrenko