diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go index e10075569..f19936231 100644 --- a/cmd/erasure-server-pool.go +++ b/cmd/erasure-server-pool.go @@ -1248,9 +1248,6 @@ func (z *erasureServerPools) IsTaggingSupported() bool { // even if one of the serverPools fail to delete buckets, we proceed to // undo a successful operation. func (z *erasureServerPools) DeleteBucket(ctx context.Context, bucket string, forceDelete bool) error { - if z.SinglePool() { - return z.serverPools[0].DeleteBucket(ctx, bucket, forceDelete) - } g := errgroup.WithNErrs(len(z.serverPools)) // Delete buckets in parallel across all serverPools. @@ -1267,14 +1264,15 @@ func (z *erasureServerPools) DeleteBucket(ctx context.Context, bucket string, fo // buckets operation by creating all the buckets again. for _, err := range errs { if err != nil { - if _, ok := err.(InsufficientWriteQuorum); ok { + if !z.SinglePool() { undoDeleteBucketServerPools(ctx, bucket, z.serverPools, errs) } - return err } } + deleteBucketMetadata(ctx, z, bucket) + // Success. return nil } diff --git a/cmd/erasure-sets.go b/cmd/erasure-sets.go index 2b4b26304..722d44586 100644 --- a/cmd/erasure-sets.go +++ b/cmd/erasure-sets.go @@ -842,9 +842,6 @@ func (s *erasureSets) DeleteBucket(ctx context.Context, bucket string, forceDele } } - // Delete all bucket metadata. - deleteBucketMetadata(ctx, s, bucket) - // Success. return nil }