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 CDC0D6EC5F; Mon, 19 Apr 2021 16:39:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CDC0D6EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618839578; bh=1ppEeXaDyQ7fPmG/dL7ePTBxyJpqjBkHv3rlwp/fYy4=; 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=nyjfK8lZz7GoSJcy5rjZ6gOVX9QoS+303amNeLLzmbGYOweCvxnQbmPNTS7IFa8JM q94I0zaeBxuvjwDVeTC4TUYRintapePsISs3YGcloT7mJs62yWGOb7SzJA+k6yuXtD wD6qVKFVLMAl13OxrBu6rFQXQSr4sqIGFGpw4XrM= Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (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 E9C136EC5F for ; Mon, 19 Apr 2021 16:39:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E9C136EC5F Received: by smtp49.i.mail.ru with esmtpa (envelope-from ) id 1lYU7l-00078q-93; Mon, 19 Apr 2021 16:39:37 +0300 To: v.shpilevoy@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <0ab8807e9374184df758b7d8ab99805317a1a871.1618590211.git.sergepetrenko@tarantool.org> Message-ID: <5cd26125-9b08-997b-c7bb-4d4682e0feee@tarantool.org> Date: Mon, 19 Apr 2021 16:39:36 +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: <0ab8807e9374184df758b7d8ab99805317a1a871.1618590211.git.sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E748094FADAEB10E66ADA4C48BE3C291E66DA182A05F538085040BC0C0E39FA954B8FBA9BDD05B3A8020F9F7222CCAAF1D2606CFF7482BA1FBDB9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE749E89BD568380EECC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7E9C30BC00893CB9AEA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA658927EB3860808999B8CEACAED95EE7B7BF6B57BC7E64490618DEB871D839B73339E8FC8737B5C22494A2C4B6BA9DFC510CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0BDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE7B96B19DC40933219935A1E27F592749D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3A6C7FFFE744CA7FB6E0066C2D8992A16C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B569F1129A2C6445075ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C97831DE09B7AF6933B95A7A82484DD75C3D90 X-C1DE0DAB: 0D63561A33F958A52902FF1D542886691417BB3C0A32A72082BB635E530562DBD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C1E32F4AD4B2486BC05C3A6A962BAA4D6E3F0B3CC4881F4F54D7DF23879F1B46A774DC938CC028BD1D7E09C32AA3244C2590CFD62604872C05F7B3450EADDD846C24832127668422FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojocJA+pXcDumLYHxte1bwpw== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F85E11EEC94FA16D498AE964A9EDB912E3D114087478469B2E424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 06/12] 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 19:25, Serge Petrenko пишет: > PROMOTE entry will be used to mark limbo ownership transition besides > emptying the limbo. So it has to be written every time > `box.ctl.clear_synchro_queue()` succeeds. Even when the limbo was > already empty. > > Part of #5445 > Follow-up fixes: ========================== diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index 0d2d274f6..8b5c76f28 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -643,7 +643,13 @@ complete:  void  txn_limbo_process(struct txn_limbo *limbo, const struct synchro_request *req)  { -       if (req->replica_id != limbo->owner_id) { +       if (req->replica_id == REPLICA_ID_NIL) { +               /* +                * The limbo was empty on the instance issuing the request. +                * This means this instance must empty its limbo as well. +                */ +               assert(req->lsn == 0 && req->type == IPROTO_PROMOTE); +       } else if (req->replica_id != limbo->owner_id) {                 /*                  * Ignore CONFIRM/ROLLBACK messages for a foreign master.                  * These are most likely outdated messages for already confirmed -- Serge Petrenko