-
Notifications
You must be signed in to change notification settings - Fork 535
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
feat(pubsub): retry transient failures in ack/modack in timed unary buffer #18395
feat(pubsub): retry transient failures in ack/modack in timed unary buffer #18395
Conversation
Tests are failing due to a regression in minitest's latest version(5.16.0). Fixed via #18396 |
No region tags are edited in this PR.This comment is generated by snippet-bot.
|
4b87bec
to
b78b8ee
Compare
google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
Outdated
Show resolved
Hide resolved
google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
Outdated
Show resolved
Hide resolved
|
||
def perform_retry_async ack_ids, ack_deadline_seconds = nil | ||
return unless retry_thread_pool.running? | ||
Concurrent::Promises.future_on( |
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.
What happens if the thread pool is shut down between the above two lines?
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.
It throws #<Concurrent::RejectedExecutionError: Concurrent::RejectedExecutionError>
which gets propagated via the error callback registered on subscriber. But this should be a rare scenario as retry_thread_pool would be shutdown only on a stop call on the subscriber and all stream shutdown are waited before shutting the buffer.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
bundle exec rake ci
in the gem subdirectory.closes: #18235