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 A4F816EC55; Mon, 19 Jul 2021 17:27:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A4F816EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626704833; bh=zlucCH/XESx3FP4cwRTWvPC3B5c5/jB+Ao/K7Nn8+Ik=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tKhyBJPB9hijakDEQfZgbqEP7xUlA3+4Hx90ozgEyVNEI7aI4ncQ12gET8K7ZDvaZ LAJv92CXEOGzsvNZEPk/DTw3oZL5b4uxHvgPzwjSBtRi88/D7Copfx/0lgmsfN/pRb ugsW5koCfFZA/ig4cVECQsdI8BXjRvu8MAz5l9ok= Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (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 3BC5D6EC55 for ; Mon, 19 Jul 2021 17:27:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3BC5D6EC55 Received: by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1m5UEh-0005fF-CD; Mon, 19 Jul 2021 17:27:11 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, gorcunov@gmail.com References: Message-ID: Date: Mon, 19 Jul 2021 16:27:09 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.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-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3FDAB68B812060C77E621B90589399EB5182A05F5380850401171EBFED09488A97524E8FEE2397247CCA0B0C4ECDCC79630FFC47B192452C8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78EDA1DD9981EFADEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063739E242D0556ED1DD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87632682529633633867212C38FFB360E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE902A1BE408319B29A68A47777D5C6D9CD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3A6C7FFFE744CA7FB03F1AB874ED89028C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F790063788B3B24285A3CD0EEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A525DB57E6B844FCAB92E358C0EC16100271D7DD94B317BDD6D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343DCFC3BEDFB0242D4EA0CC8B5E62595D2279BDED368B66CA1E7EBC110F508757769C8FD6FFE6259F1D7E09C32AA3244CA6FA2C64848795724E75569483314320725D5B54B2FE4575FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojL49Xu4qyFBl7POpn23bJfw== X-Mailru-Sender: 9482C2B233321BD265E20EF144C8F825AB3CCCBEC703C2E2C4F568A5907AECDAEC09A834B12B1ADCF8074692E4F50D75C77752E0C033A69E6F2E6AD49324154B9149A12A345FCA4B6C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 0/5] Bootstrap voter 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" 18.07.2021 18:53, Vladislav Shpilevoy пишет: > Changes in v2: > - Moved 'manual' election mode fix into a separate commit; > - Replaced raft_start/stop_candidate() with raft_promote/restore(); > - Renamed ballot.can_be_leader to ballot.can_lead. > > Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-6018-boot-voter > Issue: https://github.com/tarantool/tarantool/issues/6018 > > Vladislav Shpilevoy (5): > replication: introduce ballot.can_lead > box: save box_raft() into a variable > raft: replace raft_start_candidate with _promote > election: during bootstrap prefer candidates > election: promote 'manual' bootstrap master > > .../unreleased/gh-6018-election-boot-voter.md | 4 + > src/box/box.cc | 74 ++++++----- > src/box/errcode.h | 2 +- > src/box/iproto_constants.h | 1 + > src/box/raft.c | 58 +++++++-- > src/box/raft.h | 4 +- > src/box/replication.cc | 11 +- > src/box/xrow.c | 14 ++- > src/box/xrow.h | 2 + > src/lib/raft/raft.c | 98 ++++++++------- > src/lib/raft/raft.h | 13 +- > test/box/error.result | 2 +- > .../gh-6018-election-boot-voter.result | 116 ++++++++++++++++++ > .../gh-6018-election-boot-voter.test.lua | 59 +++++++++ > test/replication/gh-6018-master.lua | 17 +++ > test/replication/gh-6018-replica.lua | 15 +++ > test/replication/suite.cfg | 1 + > test/unit/raft.c | 41 ++++--- > test/unit/raft.result | 22 ++-- > test/unit/raft_test_utils.c | 17 +-- > test/unit/raft_test_utils.h | 16 +-- > 21 files changed, 438 insertions(+), 149 deletions(-) > create mode 100644 changelogs/unreleased/gh-6018-election-boot-voter.md > create mode 100644 test/replication/gh-6018-election-boot-voter.result > create mode 100644 test/replication/gh-6018-election-boot-voter.test.lua > create mode 100644 test/replication/gh-6018-master.lua > create mode 100644 test/replication/gh-6018-replica.lua > Thanks for the fixes! LGTM.