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 ABA6C6EC55; Fri, 23 Jul 2021 10:46:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org ABA6C6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627026401; bh=3V2lq0exwcreFD9SDDpemJE29J1MBHpNS3nYrQgsWDI=; 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=zqnMXOyiDPgKc5Q48JldZTsJqlnn3nnR1f+kfoZ8blNKdO4yXUAWJ6UA1gBokh1jQ Aw5Kp5otKcB5pBZPZznjuKNAM438HT0L/I8LbOhWA44gPY5RQK4EAziaVITkRcc/7F goAzfPuzDPF3SJVGxBMlN7XJoDiA5ZWwWcDt3nFw= Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (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 E3BC96EC5C for ; Fri, 23 Jul 2021 10:45:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E3BC96EC5C Received: by smtp61.i.mail.ru with esmtpa (envelope-from ) id 1m6prs-00031f-8N; Fri, 23 Jul 2021 10:45:12 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <8f3da7c3f32f75bf2b38a01a02dabe31c59d5a1a.1626287002.git.sergepetrenko@tarantool.org> Message-ID: <5803c804-9688-ae9c-acff-2f7c9b15b975@tarantool.org> Date: Fri, 23 Jul 2021 09:45:10 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD941C43E597735A9C30A5AB0699C09BB51962E4FF0DD431C8A182A05F538085040AFB36B5117CA0AB5A521C90CF039307C836A9AB41C712CCB409FAECE32BCF4C3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79AF9A4DE526B45BBEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637325F50A45595CD878638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8BCD96E8DF7F853836A4C96A3B0F791D7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B60CDF180582EB8FBA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FC79208AED5C9789023AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F790063708CEA5D01BFC9E7DD81D268191BDAD3D698AB9A7B718F8C4D1B931868CE1C5781A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E6252C6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A567C61A4A4174694E5BCB6AFFF389D608EDB1D0E9AB9CCB0FD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3414C91BA6844B96CA74691FE8EF7EE2AD6D3F59B3792649A799AD7B8192B96CD0CF1F1CC48378DCDD1D7E09C32AA3244C0F1CEBA9FD62125186955FF29678B9CF69B6CAE0477E908DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojtKXY6NTIXk3RPKGPOSB9jg== X-Mailru-Sender: 9482C2B233321BD2827D960CA7C4D2E23D4229D2889E540D4BF5703BE2051550091DED475A21D7D36BB2E709EA627F343C7DDD459B58856F0E45BC603594F5A135B915D4279FF0579437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 11/16] box: make promote on the current leader a no-op 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: Sergey Petrenko via Tarantool-patches Reply-To: Sergey Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 22.07.2021 01:26, Vladislav Shpilevoy пишет: > Thanks for the patch! > > Could you please add a test? Not even necessary in its own file. You > could use qsync_basic/election_basic. Ok, sure. I think gh-6034-election-promote-bump-term suits our needs better. ============================== diff --git a/test/replication/gh-6034-election-promote-bump-term.result b/test/replication/gh-6034-election-promote-bump-term.result index 8be4e8243..3999cfcc9 100644 --- a/test/replication/gh-6034-election-promote-bump-term.result +++ b/test/replication/gh-6034-election-promote-bump-term.result @@ -19,3 +19,12 @@ assert(box.info.election.term == term + 1)   | ---   | - true   | ... + +-- Consequent promotes are no-ops on the leader. +box.ctl.promote() + | --- + | ... +assert(box.info.election.term == term + 1) + | --- + | - true + | ... diff --git a/test/replication/gh-6034-election-promote-bump-term.test.lua b/test/replication/gh-6034-election-promote-bump-term.test.lua index 1e814bf5d..52429394b 100644 --- a/test/replication/gh-6034-election-promote-bump-term.test.lua +++ b/test/replication/gh-6034-election-promote-bump-term.test.lua @@ -7,3 +7,7 @@ box.cfg{election_mode='off'}  term = box.info.election.term  box.ctl.promote()  assert(box.info.election.term == term + 1) + +-- Consequent promotes are no-ops on the leader. +box.ctl.promote() +assert(box.info.election.term == term + 1) ==============================