From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Serge Petrenko <sergepetrenko@tarantool.org>, tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 4/4] election: activate raft split vote handling Date: Thu, 20 Jan 2022 01:44:29 +0100 [thread overview] Message-ID: <01568035-c0a5-ef83-e5b8-f0fc7037f68b@tarantool.org> (raw) In-Reply-To: <0477f8c4-344d-eed0-9f88-e3f6097342e5@tarantool.org> 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 ====================
next prev parent reply other threads:[~2022-01-20 0:47 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-15 0:48 [Tarantool-patches] [PATCH 0/4] Split vote Vladislav Shpilevoy via Tarantool-patches 2022-01-15 0:48 ` [Tarantool-patches] [PATCH 1/4] raft: fix crash on election_timeout reconfig Vladislav Shpilevoy via Tarantool-patches 2022-01-18 13:12 ` Serge Petrenko via Tarantool-patches 2022-01-15 0:48 ` [Tarantool-patches] [PATCH 2/4] raft: track all votes, even not own Vladislav Shpilevoy via Tarantool-patches 2022-01-21 0:42 ` Vladislav Shpilevoy via Tarantool-patches 2022-01-15 0:48 ` [Tarantool-patches] [PATCH 3/4] raft: introduce split vote detection Vladislav Shpilevoy via Tarantool-patches 2022-01-18 13:20 ` Serge Petrenko via Tarantool-patches 2022-01-20 0:44 ` Vladislav Shpilevoy via Tarantool-patches 2022-01-20 10:21 ` Serge Petrenko via Tarantool-patches 2022-01-20 23:02 ` Vladislav Shpilevoy via Tarantool-patches 2022-01-15 0:48 ` [Tarantool-patches] [PATCH 4/4] election: activate raft split vote handling Vladislav Shpilevoy via Tarantool-patches 2022-01-18 13:21 ` Serge Petrenko via Tarantool-patches 2022-01-20 0:44 ` Vladislav Shpilevoy via Tarantool-patches [this message] 2022-01-16 14:10 ` [Tarantool-patches] [PATCH 0/4] Split vote Konstantin Osipov via Tarantool-patches 2022-01-17 22:57 ` Vladislav Shpilevoy via Tarantool-patches 2022-01-18 7:18 ` Konstantin Osipov via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=01568035-c0a5-ef83-e5b8-f0fc7037f68b@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 4/4] election: activate raft split vote handling' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox