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 242056E200; Sat, 19 Jun 2021 01:49:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 242056E200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1624056565; bh=NcM4VuePAZSYdxnDp15IGKaUVPF1CWvVOMDH9+0DqpI=; 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=ZweTxv+qKiNiYwwNFlNCrCtpi98xN1UUYQ4SX33uvURIbvYKZ3xMsAaEazdzlDAlT J1uscO7GdSAuv62DyP+W8xGojaiuNPMerCpjHa6WY9lXe4XKVIFW0taOOFEVVGyf0O PEc0EBzA6Zeqd55TlbHzCyHLgNLT+Do+Gbz6RoRw= 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 ECDBF6E200 for ; Sat, 19 Jun 2021 01:49:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org ECDBF6E200 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1luNIh-00042k-4O; Sat, 19 Jun 2021 01:49:23 +0300 To: Serge Petrenko , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <9e9aa0e6-36af-bdd5-bf8b-e0e5e07195f7@tarantool.org> Message-ID: Date: Sat, 19 Jun 2021 00:49:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91C2C07775F13263A65B2A0865841DD232D6C915D49D3808000894C459B0CD1B96D1CE206E1872CEEF03158C38A2AE3741423CBEC9FF1E7EF9ECE68BC6CABF9FF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F09446BC3D835A58EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E8DF562B6063DE0A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D853689293BE17C85FE2067E44F5B177DC117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DCB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B65D56369A3576CBA5089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C97831F674C1C9E8807E93AB73A7D1547457A7 X-C1DE0DAB: 0D63561A33F958A5BC3F0FA4A4836FC46F6A32DF0B3961B4B474428F383F5335D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AC632F0BE69382F3488F2C6FE945D9D76414AB5E743FB08DD6E876B951B5E0C3D9A70BA90950A18E1D7E09C32AA3244C1AD7AC4FAAD478159FF855D4DD4BBFF764EE5813BBCA3A9DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj0Roc5o5ut94XfcKqYS+GSQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638228C265578B55867998A36C3E67C5011903841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 3/7] txn_limbo: fix promote term filtering 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the fixes! > 15.06.2021 23:57, Vladislav Shpilevoy пишет: >> Thanks for the patch! >> >> On 10.06.2021 15:32, Serge Petrenko via Tarantool-patches wrote: >>> txn_limbo_process() used to filter out promote requests whose term was >>> equal to the greatest term seen. This wasn't correct for PROMOTE entries >>> with term 1. >>> >>> Such entries appear after box.ctl.promote() is issued on an instance >>> with disabled elections. Every PROMOTE entry from such an instance has >>> term 1, but should still be applied. Fix this in the patch. >> Didn't we agree that PROMOTE should bump the term always? I see no purpose >> for the PROMOTE which never bumps the term except for the tests, but for >> such occasion it would be better to have internal.make_leader() or something >> which bypasses everything. Although the best option would to bump the term >> always. >> >> I see you did something in the last commit about that, but the part >> about `limbo->promote_greatest_term > 1` still remains. It looks very >> illegal to point out some terms as "special". > > What about old instances? > They may issue multiple promotes for the same term when elections are off. What if they issue multiple promotes for the same term > 1? They could have elections enabled, then the term was bumped a few times, then elections were turned off again. Next promotes will use the current term which is > 1, won't they? > Previous behaviour (wrong, because we forgot to filter out too old promotes at all) > made the instance apply all such promotes. > > I thought we should allow multiple promotes, at least for the default term (1), which > happen only when elections are turned off and have never been turned on. > > Otherwise, having a new instance together with the old one in the same cluster, > you'll have one of them apply all the promotes for one term, and have one dataset, > and the other ignore all but the first promote, and have possibly different data.> I did fix the issue in the last commit. All the new instances will issue promotes with > increasing term each time, and the term will be >= 2. > > So all the promotes with term == 1 surely will be from the old instances.