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 1338B6ECE3; Thu, 20 Jan 2022 03:47:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1338B6ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1642639640; bh=W5oCO69wTkeQrLB4+2KmYdzr5fBfh/t2L8faV8X5ijI=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QPA3Kwhfrnhb3fhIE9vxqQFYcN/lrZzkF3qdPfOi5vcG8bLNEtC8Q7fHihu2fnt1Q MRy7iEgaKmWtMUw8JSgFnbL+cJZmq2cnADh5HdCqrzaNy3B1ilDMfQnTGuhgUv7EZ+ 6gzh+Yxrz8nEbLTHxAXo2JVvoyGMo/CxQQs5GCA4= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 490816ECE4 for ; Thu, 20 Jan 2022 03:44:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 490816ECE4 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1nALZ0-0001Rq-Lq; Thu, 20 Jan 2022 03:44:31 +0300 Message-ID: <01568035-c0a5-ef83-e5b8-f0fc7037f68b@tarantool.org> Date: Thu, 20 Jan 2022 01:44:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Serge Petrenko , tarantool-patches@dev.tarantool.org References: <0477f8c4-344d-eed0-9f88-e3f6097342e5@tarantool.org> In-Reply-To: <0477f8c4-344d-eed0-9f88-e3f6097342e5@tarantool.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD98A33503A0B8627DB9805B11801DDEF907693B8FA34D62700182A05F53808504030388329E2F3F754DEAE9BDF7E1E87DC76D593AA339D65F9808184FCD689F06A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D636C6B786B38B6A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87F1D595375E8D899D9327F684543EB94117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FE5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A55FA976B1A562441A11C835EF365FA34605FD1BB8954CB259D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA754D8E939D8DBE9AFC410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346C409ABC5F9C579BFF103CD7529FA684DDB441E9AC3B5D9991C4F13275C930D8A826327A9C5A91121D7E09C32AA3244C92331E3D49725D7A2CC065C1ACC67B75435BF7150578642F729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPeoZbWa28mwL5xJahOtaWw== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D69825BD3A87A51E50B63B6C62CC414C883841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E25FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 4/4] election: activate raft split vote handling 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" Thanks for the review! >> diff --git a/src/box/raft.c b/src/box/raft.c >> index 1e360dc88..1908b71b6 100644 >> --- a/src/box/raft.c >> +++ b/src/box/raft.c >> @@ -229,7 +229,9 @@ box_raft_update_election_quorum(void) >>        *   be lost. >>        */ >>       int quorum = MIN(replication_synchro_quorum, max); >> -    raft_cfg_election_quorum(box_raft(), quorum); >> +    struct raft *raft = box_raft(); >> +    raft_cfg_election_quorum(raft, quorum); >> +    raft_cfg_cluster_size(raft, replicaset.registered_count); > > Better use `max` instead of `replicaset.registered_count` here. > I don't think something could go wrong with setting cluster size to zero > initially, but let's better avoid that. Done: ==================== diff --git a/src/box/raft.c b/src/box/raft.c index 1908b71b6..be6009cc1 100644 --- a/src/box/raft.c +++ b/src/box/raft.c @@ -231,7 +231,7 @@ box_raft_update_election_quorum(void) int quorum = MIN(replication_synchro_quorum, max); struct raft *raft = box_raft(); raft_cfg_election_quorum(raft, quorum); - raft_cfg_cluster_size(raft, replicaset.registered_count); + raft_cfg_cluster_size(raft, max); } void ====================