-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
listener: ListenerSocketFactoryImpl does not dup listen fd at in place update #18677
listener: ListenerSocketFactoryImpl does not dup listen fd at in place update #18677
Conversation
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
/assign @mattklein123 |
This PR address the minor issue of the below sequence
The expectation is that Actual |
In step (3) above, why not just go and force close the draining listener socket X? Or, perhaps do something like hot restart where we wait some period of time after making Y and then just go and close X since we assume Y will pick up new sockets? In any case, per offline discussion, we aren't going to merge this PR since:
I would recommend closing this PR, opening an issue about the above bug, and then we can look at a different and more targeted fix for it? |
Agree with the direction that the new share() is not appropriate.
Make sense. I will create issue and the list the potential fixes |
@lambdai @mattklein123 I seem to be hitting a similar issue in #20113, where during the listener drain sequence, requests are not rejected by the listener being removed. Instead, the draining listener allows the client to connect to it, which hangs till the drain interval expires. |
Commit Message:
Fixed the bug that in place update listener holding listen fd during the drain.
The solution is to share the listen sockets without fd duplication.
Previous: The new listener create new listen socket fd which has the same inode as the old listen fd.
This PR: The new listener copy the shared_ptr of the previous listen socket. No fd is created.
Additional Description:
Risk Level:
Testing: Modified unit test.
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Fix #18616
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]