Skip to content
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: starting Sharding with separate Coordinator role, #31637 #31889

Merged
merged 3 commits into from
Mar 22, 2023

Conversation

patriknw
Copy link
Member

  • this feature was completely broken
  • note that the ddata replicator is used for both
    DDataShardCoordinator and DDataRememberEntities
    • the DDataShardCoordinator replicator can be on the same role as the coordinator
    • for remmeber entities it's both the CoordinatorStore and the ShardStore, to not complicate
      that too much I used a replicator without role for remember entities when those two roles
      are different

Original contribution in #31487

References #31637

* this feature was completely broken
* note that the ddata replicator is used for both
  DDataShardCoordinator and DDataRememberEntities
  - the DDataShardCoordinator replicator can be on the same role as the coordinator
  - for remmeber entities it's both the CoordinatorStore and the ShardStore, to not complicate
    that too much I used a replicator without role for remember entities when those two roles
    are different
Copy link
Member

@johanandren johanandren left a comment

Choose a reason for hiding this comment

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

LGTM with one small clarification-suggestion

// when using another coordinator role than the shard role the coordinator may have to be started
val startCoordinatorMsg = StartCoordinatorIfNeeded(typeName, settings, allocationStrategy)
guardian ! startCoordinatorMsg
}
Copy link
Member

Choose a reason for hiding this comment

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

Ok, so if the node hosts shards, it will start the coordinator from the Start command, but if not we need this extra trigger.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is right, if it's not a "shard role" it will start a proxy, but that may also be a "coordinator role". The StartProxy message doesn't contain all needed parameters and that is also used in from elsewhere. Therefore I added this as a separate message.

@patriknw patriknw merged commit 755b83c into main Mar 22, 2023
@patriknw patriknw deleted the wip-31637-coordinator-role-patriknw branch March 22, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants