-
Notifications
You must be signed in to change notification settings - Fork 10
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
Retry storage access on internal errors #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but this doesn't handle the case where mettle workers go directly to storage (probably that wants a retryable wrapper around the 'clients' in this package too).
It also won't retry if you get an initial reader or writer successfully but it fails later. Do we know if that happens or if it's generally upfront that it fails?
You might also want to rebase on master - #181 eventually got a green build out of golangci. |
Do you mean when we use the
That's a very good point. There's no indication that this is only happening when initialising the reader/writers, so I'll add retries for that as well. |
Abandoning this PR, as we can just use the retry logic from the GCS client, we just need to update the storage package for that. |
This revision adds a
retryBucket
struct that wraps thebucket
interface in order to implement a retry logic on top of it. We go through this logic only on internal errors.We are implementing this following an increase in the number of internal errors coming from reads on GCP buckets. The only suggested solution is to just retry when those errors occur: googleapis/google-cloud-go#784