Skip to content

storage: re-add retries for s3 delete_prefix#3364

Merged
GuillaumeGomez merged 2 commits into
rust-lang:mainfrom
syphar:retry-delete
Jun 12, 2026
Merged

storage: re-add retries for s3 delete_prefix#3364
GuillaumeGomez merged 2 commits into
rust-lang:mainfrom
syphar:retry-delete

Conversation

@syphar

@syphar syphar commented Jun 9, 2026

Copy link
Copy Markdown
Member

Digging into an error with the repackage command, I realized the DeleteObjects API only retries for errors in the main api call, and doesn't retry single failed objects on mixed responses (where some deletes fail, and some succeed).

See https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html#API_DeleteObjects_Examples

Here we add it back.

On top, I'm adding parallelization if we have to delete more than 1000 objects.

@syphar syphar self-assigned this Jun 9, 2026
@syphar syphar requested a review from a team as a code owner June 9, 2026 22:57
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Jun 9, 2026
Comment thread crates/lib/docs_rs_storage/src/backends/s3.rs Outdated
@syphar syphar requested a review from GuillaumeGomez June 12, 2026 06:31
@GuillaumeGomez

Copy link
Copy Markdown
Member

Looks good to me, thanks!

@GuillaumeGomez GuillaumeGomez merged commit e0fd426 into rust-lang:main Jun 12, 2026
13 checks passed
@GuillaumeGomez GuillaumeGomez deleted the retry-delete branch June 12, 2026 10:01
@github-actions github-actions Bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Jun 12, 2026
@rustbot rustbot mentioned this pull request Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants