-
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
Fix sharding tolerant reader #5976
Fix sharding tolerant reader #5976
Conversation
…rdHomeAllocated` messages (akkadotnet#5967)" This reverts commit 4fa7abb.
case ShardHomeAllocated homeAllocated: | ||
// if we already have identical ShardHomeAllocated data, skip processing it | ||
// addresses https://github.com/akkadotnet/akka.net/issues/5604 | ||
if (CurrentState.Shards.TryGetValue(homeAllocated.Shard, out var currentShardRegion) |
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.
We had an identical duplicate message. Ignore it and continue.
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.
This should be much safer - cc @ismaelhamed
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.
Yes. This looks more like what we've done in the past (basically delete newest ShardHomeAllocated
events).
I think this is due to having two active clusters at the same time, probably because of a network partition during shutdown of some of the nodes.
There's another take of this one in which you get shards that have not being allocated yet: akka/akka#17955
But it's been ages since I've seen any of those, to be honest.
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.
LGTM, I'll make a backport after this is merged.
Hopefully @ismaelhamed gets back to us in a day or two with his comments - I don't want to merge a change into this code over his objections even though we're "on the clock" to get some fixes out to v1.4 soon. |
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.
LGTM
Fixes #5604
Reverts #5967
Changes
De-duplicate only exact
ShardHomeAllocated
duplicate data, makes the changes to thePersistentShardCoordinator
safer and more narrow in scope than #5967Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):