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): ignore grpc errors in ack/modack #5796

Merged
merged 6 commits into from Mar 28, 2022

Conversation

hongalex
Copy link
Member

@hongalex hongalex commented Mar 24, 2022

With the upcoming exactly-once delivery feature, acks/modacks can return errors. However, if the user is not using exactly-once, these errors should be ignored as ack/modack should be fire-and-forget. When exactly-once is supported, we will also need to check if the user has set exactly-once from StreamingPull responses and retry or return the error.

Fixes #5797

@hongalex hongalex requested review from a team as code owners March 24, 2022 20:53
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Mar 24, 2022
@hongalex hongalex changed the title fix(pubsub): ignore invalid argument errors in ack/modack fix(pubsub): ignore grpc errors in ack/modack Mar 24, 2022
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Mar 25, 2022
@hongalex hongalex enabled auto-merge (squash) March 28, 2022 17:09
@hongalex hongalex merged commit 4fb9aec into googleapis:main Mar 28, 2022
@hongalex hongalex deleted the fix-pubsub-ack-id-error branch March 28, 2022 18:42
// This addresses an error where `context deadline exceeded` errors
// not captured by the previous case causes fatal errors.
// See https://github.com/googleapis/google-cloud-go/issues/3060
if strings.Contains(err.Error(), "context deadline exceeded") {
if err != nil && strings.Contains(err.Error(), "context deadline exceeded") {
Copy link

Choose a reason for hiding this comment

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

Does the RPC error include an ErrorInfo? We should really be using that rather than relying on the error message.

Copy link
Member Author

@hongalex hongalex Mar 29, 2022

Choose a reason for hiding this comment

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

So this was a strange error that wasn't coming from the server (as far as I could tell) so I'm not entirely sure if it has ErrorInfo. I believe the real fix for this is to find the underlying cause where this context deadline exceeded is bubbling up and address it there (might be coming from the grpc-go library).

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: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: ack/modack errors can cause subscribe to stop
3 participants