fix: improve bucket deletes we were leaving behind few files (#13364)

bucket deletes should purge entire bucket metadata
appropriately, use rename() to move the metadata files
to trash folder,

for dangling buckets instead of doing recursive deletes,
rename such buckets to trash folder as well.

Bonus: reduce retry duration for listing to 200ms
This commit is contained in:
Harshavardhana
2021-10-06 09:20:25 -07:00
committed by GitHub
parent 72a17bdd76
commit 60aad1b717
3 changed files with 11 additions and 40 deletions

View File

@@ -1448,7 +1448,8 @@ func (z *erasureServerPools) DeleteBucket(ctx context.Context, bucket string, fo
}
}
deleteBucketMetadata(ctx, z, bucket)
// Purge the entire bucket metadata entirely.
z.renameAll(ctx, minioMetaBucket, pathJoin(bucketMetaPrefix, bucket))
// Success.
return nil