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): ensure timeout settings are respected #4329

Merged
merged 3 commits into from
Jun 28, 2021

Conversation

tmdiep
Copy link
Contributor

@tmdiep tmdiep commented Jun 28, 2021

Fixes to ensure PublisherSettings.Timeout and ReceiveSettings.Timeout are respected.

  • Adds requestTimer for imposing timeouts on requests.
  • Sets a limit of 2 min (or less if a lower timeout is provided by the user in settings) for stream initializations to mitigate stuckness. If this duration expires, stream initialization is retried with backoff.
  • Sets a timeout for the first update of partitionCountWatcher from user-provided settings. This can stall publisher start up.

Minor refactor:

  • Changes retryableStream.setCancel() to retryableStream.newStreamContext().

@tmdiep tmdiep requested review from a team as code owners June 28, 2021 12:18
@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the Pub/Sub Lite API. label Jun 28, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 28, 2021
@tmdiep tmdiep merged commit e75262c into googleapis:master Jun 28, 2021
@tmdiep tmdiep deleted the stream_init_timeout branch June 28, 2021 20:46
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants