fix(pubsub): ignore grpc errors in ack/modack#5796
Merged
hongalex merged 6 commits intogoogleapis:mainfrom Mar 28, 2022
Merged
Conversation
maheshgattani
approved these changes
Mar 28, 2022
jskeet
reviewed
Mar 29, 2022
| // 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") { |
Contributor
There was a problem hiding this comment.
Does the RPC error include an ErrorInfo? We should really be using that rather than relying on the error message.
Member
Author
There was a problem hiding this comment.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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