-
Notifications
You must be signed in to change notification settings - Fork 226
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
Retriable errors and backoffs #898
Comments
Good catch, I think you are right. The retry will still happen because of the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm working on a tool that uses fetcher.go, and also calls GetProofByHash. I'd like to configure it to do backoffs and retries. I see that fetcher.go uses a
Backoff
struct provided internally:certificate-transparency-go/scanner/fetcher.go
Lines 273 to 292 in 6ecca40
But I think that usage might be broken.
Backoff
will only retry on grpc error codes that are retriable, plus theRetriableError
struct. The GetRawEntries call I linked to is implemented byjsonclient.GetAndParse
, which returns RspErrors. Those RspErrors don't match any of the conditions for retries.I'd like to propose this: In addition to / instead of backoff.RetriableError, the backoff package should check for some interface, e.g.
Retryable() bool
. Thenjsonclient.RspError
can implementRetryable()
as: a RspError is retryable if its wrapped error is a net.Timeout error OR the HTTP status code is >500.What do you think?
The text was updated successfully, but these errors were encountered: