Commit 3bc8c49
Retry requests when status code is 429 (apache#410)
This code is what HTTP uses to indicate the client has sent too many
requests in a given amount of time. It may sound counter-intuitive to
retry in this situation, but that's why we use an exponential backoff
mechanism. It gives the server the opportunity to recover, without
failing the requests immediately.
The retry mechanism already works in object stores like S3 because they
return a server error. But without this change, we are not handling GCS
properly. GCS returns a client error `429 Too Many Requests` instead.
This change enables retries on this response too.
A more advanced retry mechanism would use the optional response header
`Retry-After`, but that is beyond the scope of this PR.
Closes: apache#3091 parent 9df5965 commit 3bc8c49
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
0 commit comments