Skip to content

Conversation

@paraseba
Copy link
Contributor

@paraseba paraseba commented Jun 19, 2025

Closes #309
Closes #425

Rationale for this change

Status code 429 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.

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#309
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paraseba
Copy link
Contributor Author

paraseba commented Jul 2, 2025

Is the unrelated Clippy error a blocker?

@kylebarron
Copy link
Member

you should be able to merge in main #418

@paraseba
Copy link
Contributor Author

paraseba commented Jul 2, 2025

@kylebarron

you should be able to merge in main #418

done

@tustvold tustvold merged commit a673ed6 into apache:main Jul 6, 2025
8 checks passed
crepererum pushed a commit to crepererum/arrow-rs-object-store that referenced this pull request Jul 10, 2025
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#309
@crepererum crepererum mentioned this pull request Jul 10, 2025
dcherian added a commit to earth-mover/icechunk that referenced this pull request Nov 12, 2025
Looks like the upstream PR was closed and released
in object-store-rs 0.12.4

apache/arrow-rs-object-store#410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S3 store fails without retrying Retry on 429s and equivalents

5 participants