mirror of
https://github.com/minio/minio.git
synced 2026-11-17 14:56:19 +00:00
Converge repeated code to common deleteBucketMetadata() (#5508)
This commit is contained in:
1 parent
8de6cf4124
commit
91101b11bb
3 files changed
+23
-29
No files matched your search
+2
-14
@@ -346,22 +346,10 @@ func (fs *fsObjects) DeleteBucket(bucket string) error {
|
||||
if err = fsRemoveAll(minioMetadataBucketDir); err != nil {
|
||||
return toObjectErr(err, bucket)
|
||||
}
|
||||
// Delete bucket access policy, if present - ignore any errors.
|
||||
_ = removeBucketPolicy(bucket, fs)
|
||||
|
||||
// Notify all peers (including self) to update in-memory state
|
||||
S3PeersUpdateBucketPolicy(bucket)
|
||||
// Delete all bucket metadata.
|
||||
deleteBucketMetadata(bucket, fs)
|
||||
|
||||
// Delete notification config, if present - ignore any errors.
|
||||
_ = removeNotificationConfig(bucket, fs)
|
||||
|
||||
// Notify all peers (including self) to update in-memory state
|
||||
S3PeersUpdateBucketNotification(bucket, nil)
|
||||
// Delete listener config, if present - ignore any errors.
|
||||
_ = removeListenerConfig(bucket, fs)
|
||||
|
||||
// Notify all peers (including self) to update in-memory state
|
||||
S3PeersUpdateBucketListener(bucket, []listenerConfig{})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user