Skip to content
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: keep alive timeout finishes transport instead of connection shutdown #722

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

steffenhaak
Copy link
Contributor

Currently, when the keep alive manager runs into a timeout, the connection is shutdown. The channel, however, cannot recover and stays in a stuck state.

Instead, we should finish the transport, which eventually will change the connection to be in transient failure mode, from where it recovers, once a stable connection can be established again.

Copy link

linux-foundation-easycla bot commented Jul 3, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@mosuem
Copy link
Contributor

mosuem commented Jul 5, 2024

Thanks for the PR! Sounds good at first glance, but I will check the specs and take a look at this PR next week.

Copy link

github-actions bot commented Jul 5, 2024

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
grpc None 4.0.2-wip 4.0.2-wip 4.0.2-wip ✔️
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️
File Coverage
lib/src/client/http2_connection.dart 💚 79 %

This check for test coverage is informational (issues shown here will not fail the PR).

API leaks ⚠️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
grpc $1.Duration
ServerHandler
Any

This check can be disabled by tagging the PR with skip-leaking-check.

Package publish validation ✔️
Package Version Status
package:grpc 4.0.2-wip WIP (no publish necessary)

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@grpc grpc deleted a comment from github-actions bot Jul 5, 2024
@steffenhaak
Copy link
Contributor Author

Quote from the specs:

If a keepalive ping is not blocked and is sent on the transport, then the keepalive watchdog timer is started which will close the transport if the ping is not acknowledged before it fires.

Closing the transport should be the appropriate thing to do. But take your time and think about it thoroughly.

I'm using a modified version for now, so there's absolutely no pressure on my side. Please let me know if I can assist you in any way with this.

@mosuem
Copy link
Contributor

mosuem commented Sep 2, 2024

LGTM in general, I filed a PR on your fork to address the failing test. Let me know what you think. Probably has to be slightly rebased after #732 landing.

@mosuem
Copy link
Contributor

mosuem commented Sep 2, 2024

@steffenhaak Also sorry for the delay!

@steffenhaak
Copy link
Contributor Author

@mosuem Great, thank you! I will take a look at it, most likely by the end of this week, and do the rebasing...

@steffenhaak
Copy link
Contributor Author

@mosuem Your changed test looks good to me. I rebased the PR on the current main branch. So I guess this PR is ready to be merged :)

@mosuem
Copy link
Contributor

mosuem commented Sep 6, 2024

@mosuem Your changed test looks good to me. I rebased the PR on the current main branch. So I guess this PR is ready to be merged :)

It seems to need a changelog entry, but then yes!

@pull-request-size pull-request-size bot added size/M and removed size/S labels Sep 6, 2024
@steffenhaak
Copy link
Contributor Author

@mosuem done :)

@mosuem mosuem merged commit 071ebc5 into grpc:master Sep 6, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants