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 #1842 #1945
Fix #1842 #1945
Conversation
nateberkopec
commented
Sep 2, 2019
•
edited
edited
- Consider fix Binder#close #1886
80b9406
to
375a751
Compare
This is almost there for me locally. It's now only failing on the phased restart test, because something appears to be closing the listener unnecessarily (no idea what that is yet but shouldn't be too hard to figure out.) |
test/test_integration.rb
Outdated
@@ -193,12 +193,12 @@ def test_phased_restart_via_pumactl | |||
done = true | |||
end | |||
end | |||
# Stop | |||
|
|||
assert File.exist? @bind_path |
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.
@Fudoshiki Why did you originally insert this assertion after the stop command is issued? Shouldn't stopping the server remove the binder?
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.
We don't need this assert
now
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.
Don't we? The original issue was that this file was removed after a phased restart was begun.
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.
My wrong, we should keep this
- If we call
phased-restart
- the file must exist, connections from old workers should close - If we stopping the server, the file must be deleted
Maybe we need add same assert
in until
block above too
And refute File.exist? @bind_path
after
Line 198 in ceda63d
ccli = Puma::ControlCLI.new ["-S", @state_path, "stop"], sout |
Possible clue in the output
This is intentional, as the test is trying to trigger a long response (sleep 40 seconds) and then have the phased restart mechanism timeout the worker trying to restart it, but it's possible that this triggers binding.close somewhere. |
ceda63d
to
f352fee
Compare
Okay, I think I've got it? Basically we're calling Previously the @own_binder logic in #1685 prevented phased restarting worker processes from calling binding.close, because it wasn't their "own" binder. Makes sense. So, we just have to figure out how to add that back in, in a way that also closes the socket when we are shutting down in a non-phased-restart scenario. |
Things I know:
What I'm not sure of:
|
dfa60fc
to
fc988dc
Compare
Similar to what you're thinking, in the past I've wondered why Binder has Kind of goes hand in hand with the similarity between |