-
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
Akka.Cluster.Sharding: enable prefer-oldest
by default on Replicator
#7290
Akka.Cluster.Sharding: enable prefer-oldest
by default on Replicator
#7290
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
@@ -297,7 +297,7 @@ public sealed class StartProxy : INoSerializationVerificationNeeded | |||
}); | |||
} | |||
|
|||
private ReplicatorSettings GetReplicatorSettings(ClusterShardingSettings shardingSettings) | |||
internal static ReplicatorSettings GetReplicatorSettings(ClusterShardingSettings shardingSettings) |
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.
Made this internal
in order to make it easy to test the real ReplicatorSettings
that we're passing into DData - straight from the source.
// only populated when remember-entities is enabled | ||
replicatorSettings.DurableKeys.Should().BeEmpty(); | ||
replicatorSettings.MaxDeltaElements.Should().Be(5); | ||
replicatorSettings.PreferOldest.Should().BeTrue(); |
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.
Detect whether or not PreferOldest
is enabled.
@@ -207,6 +207,9 @@ akka.cluster.sharding { | |||
distributed-data { | |||
# minCap parameter to MajorityWrite and MajorityRead consistency level. | |||
majority-min-cap = 5 | |||
|
|||
# ShardCoordinator is singleton running on oldest | |||
prefer-oldest = on |
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.
prefer-oldest
should have been enabled for the DDataShardCoordinator
when #5146 was originally introduced, but I overlooked it. This should play a key factor in #6973 - where LWWRegister
data from the DDataShardCoordinator
is going missing when the coordinator is pushing updates as it's exiting the cluster.
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
Changes
Partially resolves #6973 - this change should have been made as part of #5146 originally
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):