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): move flow control release to callback completion #9311

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

hongalex
Copy link
Member

This moves the flow control release to the end of the user callback rather than to the message doneFunc. This further emphasizes the importance of calling ack and nack within the callback, since calling ack in a goroutine could mean that flow control resources are released too early. This behavior is already documented

Fixes #9309
Internal issue: 322090131

@hongalex hongalex requested review from shollyman and a team as code owners January 26, 2024 01:25
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: pubsub Issues related to the Pub/Sub API. labels Jan 26, 2024
@hongalex hongalex enabled auto-merge (squash) January 26, 2024 17:52
@hongalex hongalex merged commit 2b6b0da into googleapis:main Jan 26, 2024
9 checks passed
@hongalex hongalex deleted the pubsub-fix-flow-control-release branch May 23, 2024 20:56
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: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: expired messages clog up flow control
2 participants