[PATCH v1 03/33] gossiper: do not ping outdated address

3 views
Skip to first unread message

Gleb Natapov

<gleb@scylladb.com>
unread,
Feb 24, 2025, 6:08:46 AMFeb 24
to scylladb-dev@googlegroups.com
A node may change its IP but some other node in the cluster may still
try to ping it using an old IP because it may receive an outdated gossiper
entry with the old IP. Do not send echo message to the old IP. It will
cause a misusing UP message with old address to be printed.
---
gms/gossiper.cc | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/gms/gossiper.cc b/gms/gossiper.cc
index b48867f79e0..c968d2205bc 100644
--- a/gms/gossiper.cc
+++ b/gms/gossiper.cc
@@ -1719,6 +1719,11 @@ void gossiper::mark_alive(inet_address addr) {
// ping an old gossip entry.
return;
}
+ if (_address_map.find(id) != addr) {
+ // We are here because id has now different ip but we
+ // try to ping the old one
+ return;
+ }
auto generation = my_endpoint_state().get_heart_beat_state().get_generation();
// Enter the _background_msg gate so stop() would wait on it
auto gh = _background_msg.hold();
--
2.47.1

Reply all
Reply to author
Forward
0 new messages