single drive: Remove bucket metadata on DeleteBucket (#15378)

from disk and in-memory map
This commit is contained in:
Poorna 2022-07-21 19:51:53 -07:00 committed by GitHub
parent 3faef829c5
commit 7d8c8de827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,6 +322,10 @@ func (es *erasureSingle) DeleteBucket(ctx context.Context, bucket string, opts D
defer NSUpdated(bucket, slashSeparator)
err := es.disk.DeleteVol(ctx, bucket, opts.Force)
// Purge the entire bucket metadata entirely.
deleteBucketMetadata(ctx, es, bucket)
globalBucketMetadataSys.Remove(bucket)
return toObjectErr(err, bucket)
}