From ec078ca55f68ca48e1c68bfadca682cf5bc643b4 Mon Sep 17 00:00:00 2001 From: Alejo Sanchez Date: Sun, 9 May 2021 10:55:39 -0400 Subject: [PATCH] raft: replication test: only cancel rearm ticker for removed server When changing configuration, don't pause and restart all tickers. Only do it for the specific server(s) being removed. Signed-off-by: Alejo Sanchez --- test/raft/replication_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/raft/replication_test.cc b/test/raft/replication_test.cc index a4fb19b41f..90dd453a23 100644 --- a/test/raft/replication_test.cc +++ b/test/raft/replication_test.cc @@ -824,14 +824,14 @@ future<> raft_cluster::change_configuration(set_config sc) { } catch (raft::commit_status_unknown& e) {} // Reset removed nodes - pause_tickers(); for (auto s: _in_configuration) { if (!new_config.contains(s)) { + _tickers[s].cancel(); co_await stop_server(s); co_await reset_server(s, initial_state{.log = {}}); + _tickers[s].rearm_periodic(tick_delta); } } - restart_tickers(); _in_configuration = new_config; }