From 2d9f40f7166abb9efb201a35f38de97af4872063 Mon Sep 17 00:00:00 2001 From: Alejo Sanchez Date: Mon, 27 Dec 2021 11:20:21 +0100 Subject: [PATCH] raft: group 0: use cfg.contains() for config check There will be nodes in non-voting state in configuration, so can_vote() is not a good check. Use newer cfg.contains(). Signed-off-by: Alejo Sanchez --- service/raft/raft_group0.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/raft/raft_group0.cc b/service/raft/raft_group0.cc index 874b4becca..1e14c03926 100644 --- a/service/raft/raft_group0.cc +++ b/service/raft/raft_group0.cc @@ -198,7 +198,7 @@ future<> raft_group0::join_group0() { co_await grp.persistence.bootstrap(std::move(initial_configuration)); co_await _raft_gr.start_server_for_group(std::move(grp)); } - if (server->get_configuration().can_vote(my_addr.id)) { + if (server->get_configuration().contains(my_addr.id)) { // True if we started a new group or completed a configuration change // initiated earlier. break;