Skip to content

Don't abruptly close anonymous connections #10337

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

Conversation

yhabteab
Copy link
Member

@yhabteab yhabteab commented Feb 4, 2025

This was mistakenly introduced with PR #7686 due to too many open connections (#7680). This was wrong in the sense that closing the connection is simply out of place here and should have been handled differently. After we revised the RPC connection disconnect procedure with v2.14.4, it becomes clear why it is wrong, because the connection is closed abruptly before the corresponding response (result) has even been written. Now if you remove the disconnect here, shouldn't the issue #7680 occur again, you ask? The answer is no, because we now also have a maximum timeout of 10s for anonymous connections, after which they are automatically closed. Thanks to the introduction of this timeout by @julianbrost in #8479, this Disconnect() call has become superfluous.

Backport of

This was mistakenly introduced with PR #7686 due to too many open
connections (#7680). This was wrong in the sense that closing the
connection is simply out of place here and should have been handled
differently. After we revised the RPC connection disconnect procedure
with `v2.14.4`, it becomes clear why it is wrong, because the connection
is closed abruptly before the corresponding response (`result`) has
even been written. Now if you remove the disconnect here, shouldn't the
issue #7680 occur again, you ask? The answer is no, because we now also
have a maximum timeout of `10s` for anonymous connections, after which
they are automatically closed. Thanks to the introduction of this
timeout by @julianbrost in #8479, this `Disconnect()` call has become
superfluous.
@yhabteab yhabteab added this to the 2.14.5 milestone Feb 4, 2025
@yhabteab yhabteab requested a review from julianbrost February 4, 2025 12:17
@cla-bot cla-bot bot added the cla/signed label Feb 4, 2025
@julianbrost julianbrost enabled auto-merge February 4, 2025 12:34
@julianbrost julianbrost merged commit 0fe1632 into support/2.14 Feb 4, 2025
23 checks passed
@julianbrost julianbrost deleted the do-not-close-connection-in-request-cert-handler-214 branch February 4, 2025 14:14
@julianbrost julianbrost mentioned this pull request Feb 4, 2025
@yhabteab yhabteab added bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) bug Something isn't working cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants