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 BC31C6EC5B; Mon, 12 Apr 2021 22:23:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BC31C6EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618255435; bh=ZtnXoFaEcXGA/OSLH1IIP9yvQmwSz/A+eAN44lxb1fU=; 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=K0FtkZfY9mzfpFhwPgkGwU9hrcHp4lIVIdMKAcq5hh5FzNvV2B7pXPeGaBiF8u8g7 WFsDUAs3rgifRIhmF1YghvGPWwlb+e0Nzkgwp+BWi0rPksreF9J1qVY7rLlBqbId1X NfG4Nd5ieR7tujTDiMBQAgRTxSqkwIBAcHIkpIDU= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 B97716EC5B for ; Mon, 12 Apr 2021 22:23:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B97716EC5B Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1lW2A6-0000wW-7Q; Mon, 12 Apr 2021 22:23:54 +0300 To: v.shpilevoy@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <12eced79-ffe5-0305-de17-d36eba02332f@tarantool.org> Date: Mon, 12 Apr 2021 22:23:53 +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: 4F1203BC0FB41BD92FFCB8E6708E74806859AC5FE18436AEED970E897805ADA4182A05F5380850404DD53F6C3005F54B5C8E647D82A80D8072ED12C805C65817FB278B953BE436CF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE718E10EF74DC9F9D0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F0D8FAB78312C5B48638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B29F588EAD3C353FA78AA16DFC849DD8F9E695ED7F9A6C896ED2E47CDBA5A96583C09775C1D3CA48CF4964A708C60C975A117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE70B7EC9B0538196269FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE75769B9710A0CF03ED32BA5DBAC0009BE395957E7521B51C20BC6067A898B09E4090A508E0FED6299176DF2183F8FC7C0A4FE7BADA07E45A8CD04E86FAF290E2D7E9C4E3C761E06A71DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3628704EBF2E554D535872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C978318F381D17C8BD03947EE597FE6297188A X-C1DE0DAB: 0D63561A33F958A5C44DDD91F215A5F84F26E5D831126288C57D84A54D671F36D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349A401E2B4D763A4A8289206CA3BF545417B0EF67CDA20448BF37930DD5D2B56BB20C1E78AE62B9A11D7E09C32AA3244C91828F590D324A550DF22E988435E9293FD9C8CA1B0515E0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojq8JA+pXcDunFEPX1Lv5CZA== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F887877646C3854EC3D7DAF5C4C4B57B48ABDE775A240BC30C424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 8/9] Support manual elections in `box.ctl.clear_synchro_queue()` 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" 11.04.2021 20:56, Serge Petrenko пишет: > This patch adds support for manual elections from > `box.ctl.clear_synchro_queue()`. When an instance is in > `election_mode='manual'`, calling `clear_synchro_queue()` will make it > start a new election round. > > Follow-up #5445 > Part of #3055 > > @TarantoolBot document > Title: describe election_mode='manual' > > Manual election mode is introduced. It may be used when the user wants to > control which instance is the leader explicitly instead of relying on > Raft election algorithm. > > When an instance is configured with `election_mode='manual'`, it behaves > as follows: > 1) By default, the instance acts like a voter: it is read-only and may > vote for other instances that are candidates. > 2) Once `box.ctl.clear_synchro_queue()` is called, the instance becomes a > candidate and starts a new election round. If the instance wins the > elections, it remains leader, but won't participate in any new elections. > --- > Force-pushed a fix for test: ============== diff --git a/test/box/error.result b/test/box/error.result index 7761c6949..dad6a21d3 100644 --- a/test/box/error.result +++ b/test/box/error.result @@ -441,6 +441,9 @@ t;   |   220: box.error.TOO_EARLY_SUBSCRIBE   |   221: box.error.SQL_CANT_ADD_AUTOINC   |   222: box.error.QUORUM_WAIT + |   223: box.error.INTERFERING_PROMOTE + |   224: box.error.RAFT_DISABLED + |   225: box.error.ALREADY_LEADER   | ...  test_run:cmd("setopt delimiter ''"); -- Serge Petrenko