-
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
Error in SplitBrainResolver.PreStart when using ChannelTaskScheduler for internal-dispatcher #5962
Comments
Hello we have reached the same conclusion. (I was about to post the same bug here) Some more context: Split brain resolver calls _cluster = Cluster.Get(Context.System); in order to be able to subscribe to cluster events on PreStart phase. That leads to exceptions being thrown during ActorSystems Extension's initialization code (ie, Lazy.Value fails) when called from SplitBrainResolver. The exception thrown is
After a quick debug a simple change like the one bellow seems to resolve the issue (sorry for the git diff dump)
|
So #5861 (comment) was my attempted fix for this issue as Akka.NET v1.4.37 also has this bug, but it would occur in the constructor and blow up the cluster supervisor.
All actors are supervised - and in this case the SBR is supervised by the default supervision strategy (restart.) The worst case scenario right now is the |
Ok, so the SplitBrainResolver should still work. I will try it out, and if it does work I will just have to live with the error log for now. |
I have multiple PR's out for Cluster, ClusterDaemon out. I am still at The main issue simply the current extensions management over Lazy<>. I try to implement an ExtensionManager soon. |
Pardon my phrasing! My understanding from the logs bellow is that SBR doesn't restart.
Should the above happen if the SBR had restarted? |
Well I learned something new today Throwing an exception in an actor's I'm trying to imagine if that's by design or not (it might be since the child actor can't really complete its startup sequence if it fails there.) Either way, that means this bug is more severe than I thought. We'll get this patched right away. |
…t restarted after a PreStart failure.
Have a fix for this in #5965 |
Verifiable reproduction by @Arkatufus here #5966 |
Resolved via #5965 |
Version Information
Version of Akka.NET? 1.4.38
Which Akka.NET Modules? Akka.Cluster
Describe the bug
When using the Akka.Cluster.SBR.SplitBrainResolver while having configured the ChannelTaskScheduler as internal dispatcher an error is thrown in the PreStart method. The error is thrown when
Cluster.Get(Context.System)
is called.I think this might be related to #5861
The error that is logged:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The node should startup without errors
Actual behavior
An error is thrown in the SplitBrainResolver class
Environment
Are you running on Linux? Windows? Docker? Which version of .NET?
=> Error occurs in Linux, Windows and Docker. .NET Version: net6.0
The text was updated successfully, but these errors were encountered: