Skip to content

Commit

Permalink
Akka.Cluster: harden ignored gossip messages (#7278)
Browse files Browse the repository at this point in the history
Added our unique address just in case the issue here is gossip intended for previous incarnations of ourselves following a fast restart.
  • Loading branch information
Aaronontheweb authored Jul 10, 2024
1 parent 8f200ef commit 9f5de84
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/Akka.Cluster/ClusterDaemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1801,14 +1801,17 @@ public ReceiveGossipType ReceiveGossip(GossipEnvelope envelope)

if (remoteGossip.Equals(Gossip.Empty))
{
_log.Debug("Cluster Node [{0}] - Ignoring received gossip from [{1}] to protect against overload",
_log.Debug("Cluster Node [{0}] - Ignoring empty received gossip from [{1}] to protect against overload",
_cluster.SelfAddress, from);
return ReceiveGossipType.Ignored;
}
if (!envelope.To.Equals(SelfUniqueAddress))
{
_cluster.LogInfo("Ignoring received gossip intended for someone else, from [{0}] to [{1}]",
from.Address, envelope.To);
_cluster.LogInfo("Ignoring received gossip intended for someone else, from [{0}] to [{1}]. Our full address is [{2}]",
from.Address, envelope.To, SelfUniqueAddress);

// TODO: if the gossip is received for a version of ourselves with a different UID, do we issue a Down command?

return ReceiveGossipType.Ignored;
}
if (!localGossip.HasMember(from))
Expand Down

0 comments on commit 9f5de84

Please sign in to comment.