-
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
Pool routers use Directive.Escalate
by default when supervising routees - this causes unintended consequences
#6295
Comments
Can we add this as an arg to the routers if it is not there already? TBH never realized this was a thing and explains a lot, a fix would be good but we should be careful to respect existing code that guards condition |
This can be configured via |
FWIW I still think we should change the default here, even though that's technically a breaking behavioral change - but I expect that the impact of the change will be more positive than not. |
We're just going to reverse this in 1.4.47. I have no doubt it does more harm than good in most cases. |
Actually, we'll push this out to 1.4.48 |
… Restart (akkadotnet#6366) * close akkadotnet#6295 - set default PoolRouter SupervisorStrategy to Restart * use the `SupervisionStrategy.DefaultStrategy` * Fix unit test * Change unit test to use RoundRobinPool router (cherry-picked from ffd9a9e)
) * close #6295 - set default PoolRouter SupervisorStrategy to Restart (#6366) * close #6295 - set default PoolRouter SupervisorStrategy to Restart * use the `SupervisionStrategy.DefaultStrategy` * Fix unit test * Change unit test to use RoundRobinPool router (cherry-picked from ffd9a9e) * Fix actor telemetry unit test --------- Co-authored-by: Aaron Stannard <aaron@petabridge.com>
Version Information
Version of Akka.NET? 1.4.46 and earlier, 1.5.0-alpha3 and earlier.
Which Akka.NET Modules? Akka
Describe the bug
Currently, the default
SupervisionStrategy
on allPool
routers usesDirective.Escalate
, which causes the router to restart and kill all routees every time any of the routees restart. This can be problematic, as it means that all routees are restarted even if only one of them has failed.Instead, I suggest changing the default
SupervisionStrategy
to return aDirective.Restart
instead. This would cause only the failed routee to be restarted, rather than restarting all routees in the pool. This would allow for more granular control over how failures are handled, and can prevent unnecessary restarts of healthy routees.To Reproduce
Reproduced with one of my unit tests on #6294
Expected behavior
Each child should be restarted individually and independently from each other.
Actual behavior
Assert.Equal(10, telemetry.ActorRestarted);
should be true, but instead thetelemetry.ActorRestarted
value is 110!That's because the following line:
Causes the router to restart all of its children 10 times apiece.
The text was updated successfully, but these errors were encountered: