scalecube / scalecube-cluster

ScaleCube Cluster is a lightweight Java VM implementation of SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol. features cluster membership, failure detection, and gossip protocol library.
http://scalecube.github.io/
Apache License 2.0
263 stars 88 forks source link

Adds to infected when gossip received from 2nd and following senders #378

Closed b9r5 closed 1 year ago

b9r5 commented 1 year ago

What is happening currently in GossipProtocolImpl.onGossipRequest(Message) is that if the (gossiper, sequence ID) is newly seen, then the sender of the gossip request is added to the gossip state's infected collection.

In a situation where member A originates some gossip, then sends it to members B and C, then B sends the gossip to C, C will not add B to the gossip state's infected collection. As least, this is how it appears to me.

This change adds the sender of the gossip request to the gossip state's infected collection even when the (gossiper, sequence ID) is not newly seen.

b9r5 commented 1 year ago

Sorry, this was not right. I will try to fix and open another PR.