mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
system_keyspace: fix assertion for missing transition_state
The code assumes that if there is no transition_state there should be no nodes that currently in transition in a state other then left_token_ring state, but rebuild operation also creates such nodes, so add the check for it as well.
This commit is contained in:
@@ -2607,8 +2607,9 @@ future<service::topology> system_keyspace::load_topology_state() {
|
||||
ret.tstate = service::transition_state_from_string(some_row.get_as<sstring>("transition_state"));
|
||||
} else {
|
||||
// Any remaining transition_nodes must be in left_token_ring state
|
||||
// or rebuilding
|
||||
auto it = std::find_if(ret.transition_nodes.begin(), ret.transition_nodes.end(),
|
||||
[] (auto& p) { return p.second.state != service::node_state::left_token_ring; });
|
||||
[] (auto& p) { return p.second.state != service::node_state::left_token_ring && p.second.state != service::node_state::rebuilding; });
|
||||
if (it != ret.transition_nodes.end()) {
|
||||
on_internal_error(slogger, format(
|
||||
"load_topology_state: topology not in transition state"
|
||||
|
||||
Reference in New Issue
Block a user