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 <alejo.sanchez@scylladb.com>
This commit is contained in:
Alejo Sanchez
2021-05-09 10:55:39 -04:00
parent 802f68317e
commit ec078ca55f

View File

@@ -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;
}