-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Reconsider cluster.role.<role-name>.min-nr-of-members fallback #28177 #28203
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
Conversation
Test PASSed. |
...sharding/src/multi-jvm/scala/akka/cluster/sharding/ClusterShardingRolePartitioningSpec.scala
Outdated
Show resolved
Hide resolved
commonConfig( | ||
ConfigFactory | ||
.parseString(""" | ||
akka.cluster.min-nr-of-members = 2 |
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.
If we make this:
akka.cluster.min-nr-of-members = 2 | |
akka.cluster.min-nr-of-members = 3 |
... then the test actually exercises the change in this PR
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.
The steps to replicate are:
- Cluster started
akka.cluster.min-nr-of-members=2
- 5 nodes total
- 3 nodes
akka.cluster.roles = [ "R1" ]
- 2 nodes
akka.cluster.roles = [ "R2" ]
- no
akka.cluster.role.*.min-nr-of-members
set
- 3 nodes
- Nodes converge
- Sharding started on all nodes for both types
- First message from an R2/E2 proxy node to an R2/E2 hosting node
- Timeout seen
However it works as expected prior to this change, could not replicate.
...sharding/src/multi-jvm/scala/akka/cluster/sharding/ClusterShardingRolePartitioningSpec.scala
Outdated
Show resolved
Hide resolved
@@ -502,7 +502,7 @@ abstract class ShardCoordinator( | |||
case None => | |||
cluster.settings.MinNrOfMembers | |||
case Some(r) => | |||
cluster.settings.MinNrOfMembersOfRole.getOrElse(r, cluster.settings.MinNrOfMembers) | |||
cluster.settings.MinNrOfMembersOfRole.getOrElse(r, 1) |
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.
🎉
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
...sharding/src/multi-jvm/scala/akka/cluster/sharding/ClusterShardingRolePartitioningSpec.scala
Outdated
Show resolved
Hide resolved
...sharding/src/multi-jvm/scala/akka/cluster/sharding/ClusterShardingRolePartitioningSpec.scala
Outdated
Show resolved
Hide resolved
Test PASSed. |
Test PASSed. |
* Avoid dead letter for rebalance timeout msg migrated from akka/akka#28274 * Reconsider cluster.role.<role-name>.min-nr-of-members fallback migrated from akka/akka#28203 * Use dedicated message for PersistentShardCoodinator termination instead of PoisonPill migrated from akka/akka#28104 * Don't initialize durable keys when rememberEntities not used migrated from akka/akka#28568 * Improve error message when coordinator not found migrated from akka/akka#28576 * Shard region registration to more potential oldest * Keep track of Leaving and Exiting members in ShardRegion and attempt to register to coordinator at several of the oldest if they have status Leaving and Exiting. Include all up to and including the first member with status Up. * Sending to wrong node doesn't matter, will be suppressed deadLetter. * Same for the GracefulShutdownReq which already had that intention by sending to 2 oldest. migrated from akka/akka#28470 * Log non-completed rebalance at warning level migrated from akka/akka#28335 * api approval fix * review fixes Co-authored-by: Aaron Stannard <aaron@petabridge.com>
References
#28177
Changes
The default fallback to global
min-nr-of-members
if a role for sharding is used now defaults to 1 instead.Background Context
There was a user case raised related to this, and a test was added to attempt to replicate the issue. However I was unable to replicate it based on the steps described by the user, which are in the test as it is understood thus far. The added test passed prior to this change, with global config for role user and not used.
Will follow up to confirm or update.