Skip to content

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

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

helena
Copy link
Contributor

@helena helena commented Nov 19, 2019

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.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR is currently being validated by Jenkins labels Nov 19, 2019
@akka-ci
Copy link

akka-ci commented Nov 19, 2019

Test PASSed.

commonConfig(
ConfigFactory
.parseString("""
akka.cluster.min-nr-of-members = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make this:

Suggested change
akka.cluster.min-nr-of-members = 2
akka.cluster.min-nr-of-members = 3

... then the test actually exercises the change in this PR

Copy link
Contributor Author

@helena helena Nov 20, 2019

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
  • 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.

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akka-ci akka-ci added validating PR is currently being validated by Jenkins and removed tested PR that was successfully built and tested by Jenkins labels Nov 20, 2019
@akka-ci akka-ci added tested PR that was successfully built and tested by Jenkins and removed validating PR is currently being validated by Jenkins labels Nov 20, 2019
@akka-ci
Copy link

akka-ci commented Nov 20, 2019

Test PASSed.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR is currently being validated by Jenkins labels Nov 20, 2019
@akka-ci
Copy link

akka-ci commented Nov 20, 2019

Test PASSed.

@helena helena merged commit 1da15d9 into akka:master Nov 20, 2019
@helena helena deleted the sharding-min-nr-members-role branch December 17, 2019 00:56
zbynek001 added a commit to zbynek001/akka.net that referenced this pull request Mar 24, 2020
zbynek001 added a commit to zbynek001/akka.net that referenced this pull request Mar 26, 2020
Aaronontheweb added a commit to akkadotnet/akka.net that referenced this pull request Mar 27, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants