Skip to content

fix(pubsub): ignore grpc errors in ack/modack#5796

Merged
hongalex merged 6 commits intogoogleapis:mainfrom
hongalex:fix-pubsub-ack-id-error
Mar 28, 2022
Merged

fix(pubsub): ignore grpc errors in ack/modack#5796
hongalex merged 6 commits intogoogleapis:mainfrom
hongalex:fix-pubsub-ack-id-error

Conversation

@hongalex
Copy link
Copy Markdown
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 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
Comment thread pubsub/iterator.go
// 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
Copy Markdown
Contributor

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
Copy Markdown
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