Skip to content

Comments

feat(services/s3): add support for HTTP 429 TooManyRequests for S3-compatible services#6589

Merged
Xuanwo merged 1 commit intoapache:mainfrom
justinjoseph89:fix-toomany-requests
Sep 23, 2025
Merged

feat(services/s3): add support for HTTP 429 TooManyRequests for S3-compatible services#6589
Xuanwo merged 1 commit intoapache:mainfrom
justinjoseph89:fix-toomany-requests

Conversation

@justinjoseph89
Copy link
Contributor

Which issue does this PR close?

Closes #6588

Rationale for this change

OpenDAL's S3 service currently only handles AWS S3's rate limiting pattern (HTTP 503 with "SlowDown" error code). Many S3-compatible services like Oracle Cloud Infrastructure Object Storage, Scaleway, and others return HTTP 429 with "TooManyRequests" error codes .

When these services return HTTP 429, OpenDAL classifies them as non-retryable ErrorKind::Unexpected errors, causing applications to fail permanently instead of implementing proper retry logic with exponential backoff. This breaks rate limiting functionality for users of S3-compatible services.

What changes are included in this PR?

  • Add HTTP 429 status code mapping to ErrorKind::RateLimited in the parse_error() function
  • Add "TooManyRequests" S3 error code mapping to ErrorKind::RateLimited in the parse_s3_error_code() function
  • Both mappings mark errors as retryable (true) to enable proper retry behavior

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Sep 23, 2025
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you for working on this!

@Xuanwo
Copy link
Member

Xuanwo commented Sep 23, 2025

Clippy is failed, we can address them in an extra PR.

@Xuanwo Xuanwo merged commit 742e196 into apache:main Sep 23, 2025
95 of 96 checks passed
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 23, 2025
sylvestre added a commit to sylvestre/sccache that referenced this pull request Jan 19, 2026
sylvestre added a commit to sylvestre/sccache that referenced this pull request Jan 19, 2026
sylvestre added a commit to mozilla/sccache that referenced this pull request Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new feature: Support HTTP 429 TooManyRequests for S3-compatible services

2 participants