mirror of
https://github.com/pgsty/minio.git
synced 2026-07-24 06:26:17 +03:00
s3: DeleteBucket to use listing before returning bucket not empty error (#20301)
Use Walk(), which is a recursive listing with versioning, to check if the bucket has some objects before being removed. This is beneficial because the bucket can contain multiple dangling objects in multiple drives. Also, this will prevent a bug where a bucket is deleted in a deployment that has many erasure sets but the bucket contains one or few objects not spread to enough erasure sets.
This commit is contained in:
@@ -145,6 +145,7 @@ type WalkOptions struct {
|
||||
LatestOnly bool // returns only latest versions for all matching objects
|
||||
AskDisks string // dictates how many disks are being listed
|
||||
VersionsSort WalkVersionsSortOrder // sort order for versions of the same object; default: Ascending order in ModTime
|
||||
Limit int // maximum number of items, 0 means no limit
|
||||
}
|
||||
|
||||
// ExpirationOptions represents object options for object expiration at objectLayer.
|
||||
|
||||
Reference in New Issue
Block a user