-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed bugs with multiple Member
s with same Address
crashing ClusterDaemon
#7371
fixed bugs with multiple Member
s with same Address
crashing ClusterDaemon
#7371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detailed my changes - gathering MNTR data on the build server and locally on my machine now.
@@ -1635,22 +1635,22 @@ public void Welcome(Address joinWith, UniqueAddress from, Gossip gossip) | |||
public void Leaving(Address address) | |||
{ | |||
// only try to update if the node is available (in the member ring) | |||
if (LatestGossip.Members.Any(m => m.Address.Equals(address) && m.Status is MemberStatus.Joining or MemberStatus.WeaklyUp or MemberStatus.Up)) | |||
foreach(var mem in LatestGossip.Members.Where(m => m.Address.Equals(address))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLDR - iterate over each Member
with the same Address
and filter them one at a time - don't do what we did before, which is to check if there are members that match this condition and then try to state-transition them all at the same time. This is what creates the IllegalOperation: invalid state transition
errors.
var member = localMembers.FirstOrDefault(m => m.Address == address); | ||
if (member != null && member.Status != MemberStatus.Down) | ||
var found = false; | ||
foreach (var member in localMembers.Where(m => m.Address == address)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the same type of issue with the Downing
function too and made similar fixes there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some questions
Changes
close #7370
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):
Leaving
if another instance of member with sameAddress
is being marked asDOWN
#7370