topology: node: update_node: do not override internal changed flag by state option

Currently, opt_st overrides the internal `changed` flag
by setting it with the opt_st changed status.
Instead, it should use `|=` to keep it true if it is already so.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>

Closes #13502
This commit is contained in:
Benny Halevy
2023-04-12 15:04:38 +03:00
committed by Tomasz Grabiec
parent bd57471e54
commit b71f229fc2

View File

@@ -220,7 +220,7 @@ const node* topology::update_node(node* node, std::optional<host_id> opt_id, std
}
}
if (opt_st) {
changed = node->get_state() != *opt_st;
changed |= node->get_state() != *opt_st;
}
if (!changed) {