Gleb Natapov
<gleb@scylladb.com>unread,Apr 7, 2025, 3:41:12 AMApr 7Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
to scylladb-dev@googlegroups.com
Now that the gossiper map is id based there can be a situation where two
entries have the same ip, Shadow round should send the newest one in
this cased. The patch makes it so.
Fixes: #23553
---
gms/gossiper.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gms/gossiper.cc b/gms/gossiper.cc
index c71608191fe..828e9cc11dd 100644
--- a/gms/gossiper.cc
+++ b/gms/gossiper.cc
@@ -500,6 +500,12 @@ gossiper::handle_get_endpoint_states_msg(gossip_get_endpoint_states_request requ
const auto& application_states_wanted = request.application_states;
for (const auto& [node, state] : _endpoint_state_map) {
const heart_beat_state& hbs = state->get_heart_beat_state();
+ auto it = map.find(state->get_ip());
+ if (it != map.end()) {
+ if (it->second.get_heart_beat_state().get_generation() < hbs.get_generation()) {
+ map.erase(it);
+ }
+ }
auto state_wanted = endpoint_state(hbs, state->get_ip());
auto& apps = state->get_application_state_map();
for (const auto& app : apps) {
--
2.47.1