[Tarantool-patches] [PATCH 4/4] election: activate raft split vote handling
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Jan 20 03:44:29 MSK 2022
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
====================
More information about the Tarantool-patches
mailing list