-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Remove TcpChannel#setSoLinger
method
#35924
Conversation
This commit removes the dedicated `setSoLinger` method. This simplifies the `TcpChannel` interface. This method has very little effect as the SO_LINGER is not set prior to the channels being closed in the abstract transport test case. We still will set SO_LINGER on the `MockNioTransport`. However we can do this manually.
Pinging @elastic/es-distributed |
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.
LGTM
@tbrooks8 @original-brownbear I am not sure I follow. Didn't we add this to make some tests be more reliable? Now we only set this on the the |
turning off the linger has outlived its usefulness due to other changes. When I first added this a year ago it was applied to all channels before closing them which had a massive impact. This caused some trouble so the logic here https://github.com/elastic/elasticsearch/pull/35924/files#diff-3b8055db0941b6b23392b71384b69678L353 started checking for the life-cycle state so that we only
I don't think we should add this to the production ones. In practice their tests' (lingering) connection counts are low enough now to not cause trouble. We could maybe set linger to |
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.
sounds good to me @original-brownbear thanks
This commit removes the dedicated `setSoLinger` method. This simplifies the `TcpChannel` interface. This method has very little effect as the SO_LINGER is not set prior to the channels being closed in the abstract transport test case.
This commit removes the dedicated
setSoLinger
method. This simplifiesthe
TcpChannel
interface. This method has very little effect as theSO_LINGER is not set prior to the channels being closed in the abstract
transport test case. We still will set SO_LINGER on the
MockNioTransport
. However we can do this manually.