-
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 cluster startup race #5185
fix cluster startup race #5185
Conversation
This definitely introduced some bugs - we might not be able to safely do this. The the blocking wait in the constructor was intentional. |
Not to say that it's impossible to fix, but it may not be so straightforward |
I didn't remove the lock. The PR passes the Cluster instance to the ClusterCoreDaemon directly |
I only tested it with RemotePingPong and it worked. |
Got it - I misunderstood. I'll take a closer look at this today. |
@Zetanova I think you need to fix this line in ClusterDomainEventPublisherSpec.cs to get tests to pass:
|
@to11mtm thx Why |
Happy to help!
Not entirely sure on that one, although I know that @Aaronontheweb has been working through some challenges on LMDB native dlls, might be related so tagging him. |
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
@@ -583,7 +583,7 @@ public override int GetHashCode() | |||
/// <summary> | |||
/// Gets a reference to the cluster core daemon. | |||
/// </summary> | |||
internal class GetClusterCoreRef | |||
internal class GetClusterCoreRef: INoSerializationVerificationNeeded |
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.
Good call
There is a race condition in ClusterDomainEventPublisher and ClusterCoreDaemon both used Cluster.Get(system) to get the cluster instance. If the ActorCells are activated before the Cluster constructer gets the answer in _clusterCore = GetClusterCoreRef().Result it will crash.
close #5184