Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

s3: use DeleteObjectsInput API to delete files in batch - fixes #8160#9016

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lobshunter wants to merge1 commit intorclone:master
base:master
Choose a base branch
Loading
fromlobshunter:batch-delete

Conversation

@lobshunter
Copy link

What is the purpose of this change?

This PR speeds up thepurge command on S3 backends by using DeleteObjects API as discussed in#8160. Another change that makes purging faster is settingquiet: true in the API request.

In my personal use case(purging ~1M of objects), the time cost drops from several hours to ~20 minutes.

Was the change discussed in an issue or in the forum before?

#8160

Checklist

  • I have read thecontribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are inhouse style.
  • I'm done, this Pull Request is ready for review :-)

…e#8160The major changes are:- using DeleteObjects API- running deletes with multiple go routines- reducing response body size by setting quiet: true in the request
maxUploadParts=10000// maximum allowed number of parts in a multi-part upload
minChunkSize=fs.SizeSuffix(1024*1024*5)
defaultUploadCutoff=fs.SizeSuffix(200*1024*1024)
purgeBatchSize=1000// the max number of objects allowed in a DeleteObjects request
Copy link
Author

Choose a reason for hiding this comment

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

This number comes from AWSdocument.

The request can contain a list of up to 1,000 keys that you want to delete.

It also works on Alibaba Cloud, but I'm kind of worried some uncommon S3 providers may set a lower limit on this. Should I set a lower value or add a new config option?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@lobshunter

[8]ページ先頭

©2009-2025 Movatter.jp