-
Notifications
You must be signed in to change notification settings - Fork 247
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 |
Hi there, I just noticed this as well! I think the intent is that the backoff But as mentioned by @jsha, Here are some options I can think of wrt. getting this fixed:
(I omitted a few options that would clearly be breaking changes.) On retry behavior: I agree that backoff and retry on 429 and 5XX makes sense in It's worth noting that the current behavior is somewhat confusing. That is, I don't have a strong opinion on what the fix for this issue should be, but I |
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: