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(pubsub): nack messages properly with error from receive scheduler #5909

Merged
merged 3 commits into from Apr 25, 2022

Conversation

hongalex
Copy link
Member

@hongalex hongalex commented Apr 18, 2022

This PR fixes a change made in #4733 which was supposed to prevent errors in the receive scheduler from bubbling up to user code (when the user had no control over this behavior). Specifically, when Shutdown is called on the receive scheduler and new messages come in, draining errors were being returned to the user. The limitation of #4733 is that the shutdown signal wasn't being used at all and messages might be added to the scheduler even after shutdown is called. This is not a user reported issue, just something I noticed when I was reading through receive_scheduler.go.

Fixes #5911

@hongalex hongalex requested review from a team as code owners April 18, 2022 21:46
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: pubsub Issues related to the Pub/Sub API. labels Apr 18, 2022
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hongalex hongalex merged commit 80edea4 into googleapis:main Apr 25, 2022
@hongalex hongalex deleted the fix-pubsub-nack-error branch April 25, 2022 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: messages in receive scheduler should be nacked if draining
2 participants