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 C13D86FC8F; Fri, 16 Apr 2021 12:34:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C13D86FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618565642; bh=JadHDm8xXaX8W2YYvLYVlY4xshkwh3QmzzbjGzOtT9g=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=GWIM5jDwRFEqVyIZ03np20daQLBCE4+dQ3tLLf30Rh5rPUyt6LUTdSIkBbzyYS3O9 vWHAfG2Wc9Fr5wit0JE5cPDkrU/XZFXPfD4xlk6e5nz7DyyrUgiOylMo2ujcj/6WkW je7vQB8roZEi8xau4gdBiQ9XHAS1uX6XIvTwnFZE= Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 07A806FC8F for ; Fri, 16 Apr 2021 12:34:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 07A806FC8F Received: by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1lXKrQ-0007ms-5F; Fri, 16 Apr 2021 12:34:00 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <486f83c475f51cd3e05edabfb56c567cd85a50ad.1618409665.git.sergepetrenko@tarantool.org> Message-ID: Date: Fri, 16 Apr 2021 12:33:59 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480B1C8842CE613979723F2FB4628545A35182A05F5380850408F043FDE33BCFB706B4F7A2BDBA84FD4A3B464357F384AE09240ABE19D9A9BE5 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE735102D6D0BF494F7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B23888C9749F3CAC8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B232055253CF461D4429B9110EC1FAACF921114FFCE5AE9CDCD2E47CDBA5A96583C09775C1D3CA48CFCF36E64A7E3F8E58117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE75A31C54DA8CF07A79FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE75B777574BC76166D7B076A6E789B0E97A8DF7F3B2552694A1E7802607F20496D49FD398EE364050F140C956E756FBB7A985B8ACC81218E19B3661434B16C20AC78D18283394535A9E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6753C3A5E0A5AB5B7089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A546BB299B030350652A74B0BE630F65FEF40B677204C0AE8ED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F6110710A6CC527FE2D11E941B7BDEFE2E6C614F9E569D82B9A7E46012267AEE1B56F8E2BBF745D81D7E09C32AA3244C633D729890D6665AB5ECFB46E348474E35DA7DC5AF9B58C0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj3S6P1v0GIqSlZc6wA3tbhg== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8B953D5D4A2C4E176BC97631B3577966352EEA641F3DC4FE5424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v3 05/10] box: write PROMOTE even for empty limbo 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 16.04.2021 02:21, Vladislav Shpilevoy пишет: > Thanks for the patch! > >> @@ -1540,11 +1542,10 @@ box_clear_synchro_queue(bool try_wait) >> * in the limbo must've come through the applier meaning they already >> * have an lsn assigned, even if their WAL write hasn't finished yet. >> */ >> - int64_t wait_lsn = txn_limbo_last_synchro_entry(&txn_limbo)->lsn; >> + wait_lsn = txn_limbo_last_synchro_entry(&txn_limbo)->lsn; >> assert(wait_lsn > 0); >> >> - int quorum = replication_synchro_quorum; >> - int rc = box_wait_quorum(former_leader_id, wait_lsn, quorum, >> + rc = box_wait_quorum(former_leader_id, wait_lsn, quorum, >> replication_synchro_timeout); > The second line became misaligned. Thanks for noticing! Fixed. ========================== diff --git a/src/box/box.cc b/src/box/box.cc index 123c611f5..be78d7096 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -1546,7 +1546,7 @@ box_clear_synchro_queue(bool try_wait)         assert(wait_lsn > 0);         rc = box_wait_quorum(former_leader_id, wait_lsn, quorum, -                                replication_synchro_timeout); +                            replication_synchro_timeout);         if (rc == 0) {                 if (quorum < replication_synchro_quorum) {                         diag_set(ClientError, ER_QUORUM_WAIT, quorum, -- Serge Petrenko