-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
=act #15040 ScatterGatherFirstCompleted reply when no routees #18260
=act #15040 ScatterGatherFirstCompleted reply when no routees #18260
Conversation
Refs #15040 |
|
||
"without routees should reply immediately" in { | ||
val probe = TestProbe() | ||
val router = system.actorOf(ScatterGatherFirstCompletedPool(nrOfInstances = 0, within = 5.seconds).props(Props.empty)) |
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.
I thought that we may consider 0
illegal here, but the case Heiko spoke of can well be triggered by all the initially in-the-pool routees to die, leaving the pool having 0 routees... then the optimisation makes sense, right?
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.
Yes, i just thought this was an easy way to test it
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.
Okey, sounds good. Making the 0 throw right away during construction probably does not buy much here in terms of safety for users, they'll notice anyway.
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.
There might be corner cases with not allowing 0, e.g. could work with 0 + resizer.
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.
I see :) The PR looks good in any case, feel free to merge when you get the time
LGTM |
Test PASSed. |
…eted-patriknw =act #15040 ScatterGatherFirstCompleted reply when no routees
No description provided.