mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 05:26:58 +00:00
topology_coordinator: notify about IP change from sync_raft_topology_nodes as well
Currently sync_raft_topology_nodes() only send join notification if a node is new in the topology, but sometimes a node changes IP and the join notification should be send for the new IP as well. Usually it is done from ip_address_updater, but topology reload can run first and then the notification will be missed. The solution is to send notification during topology reload as well.
This commit is contained in:
@@ -621,7 +621,9 @@ future<storage_service::nodes_to_notify_after_sync> storage_service::sync_raft_t
|
||||
auto ip = _address_map.find(host_id);
|
||||
co_await process_normal_node(id, host_id, ip, rs);
|
||||
if (ip) {
|
||||
sys_ks_futures.push_back(raft_topology_update_ip(host_id, *ip, id_to_ip_map, prev_normal.contains(id) ? nullptr : &nodes_to_notify));
|
||||
auto it = id_to_ip_map.find(host_id);
|
||||
bool notify = it == id_to_ip_map.end() || it->second != ip || !prev_normal.contains(id);
|
||||
sys_ks_futures.push_back(raft_topology_update_ip(host_id, *ip, id_to_ip_map, notify ? &nodes_to_notify : nullptr));
|
||||
}
|
||||
}
|
||||
for (const auto& [id, rs]: t.transition_nodes) {
|
||||
|
||||
Reference in New Issue
Block a user