-
Notifications
You must be signed in to change notification settings - Fork 594
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
=htc #1245 fix pool idle-timeout race condition #1311
=htc #1245 fix pool idle-timeout race condition #1311
Conversation
Test PASSed. |
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.
Fix LGTM, thanks for the explanation - perhaps add it above the shuttingDown too so it's easier to remember once we revisit this code some day why it was needed without reading the impl.
I see why adding a good reproducer will be tricky... Starting a server that's very slot in delivering the responses perhaps could do it?
No, actually that's not where the race condition is. It's between |
0006c1b
to
1f17111
Compare
Added another comment as you suggested. |
Test PASSed. |
I have an idea for a test, let's try that. |
Thanks for explaining the race in detail, that's indeed very tricky to reproduce :O Looking forward to see how you get around to it :) |
Haha, the test revealed another race condition 🙄 |
The pool is a present that keeps on giving... 🙄 |
Previously, a shutdown request didn't check if there are outstanding requests so that outstanding responses were just lost.
1f17111
to
9427fb0
Compare
The test turned out to end up quite simple. It failed for me reliably with the timings given but that might be different on another machine. |
Test PASSed. |
Fixes #1245 |
Previously, a shutdown request didn't check if there are outstanding
requests so that outstanding responses were just lost.
This is still missing tests, but I haven't been able to reproduce it reliably. The reason is that there's only a short time frame where you can hit the race, i.e. while the scheduled
gateway.shutdown
is dispatched throughPoolMasterActor
toPoolInterfaceActor
a new request must come in.