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(pubsublite): mitigate gRPC stream connection issues #5382

Merged
merged 6 commits into from Feb 8, 2022

Conversation

tmdiep
Copy link
Contributor

@tmdiep tmdiep commented Jan 20, 2022

Mitigates hanging streams by detecting idle streams and reconnecting after a timeout (default 10min for partition assignment streams, 2min for all others). If the user has specified a lower timeout in settings, this will be used for publish, subscribe and commit streams.

The StreamIdleTimer is restarted when the client receives a response on the stream. The stream is reinitialized when the timeout expires. For publish and commit streams, the timeout will still expire even if there is no user activity.

@tmdiep tmdiep requested review from a team as code owners January 20, 2022 07:11
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: pubsublite Issues related to the Pub/Sub Lite API. labels Jan 20, 2022
@tmdiep
Copy link
Contributor Author

tmdiep commented Feb 1, 2022

This is a port of the logic in the Java lib (googleapis/java-pubsublite#1038), which has been tested internally for over a week. It seems to have eliminated the stream hanging issues since rollout.

@tmdiep tmdiep merged commit 8763ef3 into googleapis:main Feb 8, 2022
@tmdiep tmdiep deleted the idle_streams branch February 8, 2022 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the Pub/Sub Lite API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants