|
|
|
@ -345,11 +345,13 @@ func (s *xlSets) MakeBucketWithLocation(bucket, location string) error { |
|
|
|
|
errs := g.Wait() |
|
|
|
|
// Upon even a single write quorum error we undo all previously created buckets.
|
|
|
|
|
for _, err := range errs { |
|
|
|
|
if err != nil { |
|
|
|
|
if _, ok := err.(InsufficientWriteQuorum); ok { |
|
|
|
|
undoMakeBucketSets(bucket, s.sets, errs) |
|
|
|
|
} |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Success.
|
|
|
|
|
return nil |
|
|
|
@ -481,11 +483,13 @@ func (s *xlSets) DeleteBucket(bucket string) error { |
|
|
|
|
// For any write quorum failure, we undo all the delete buckets operation
|
|
|
|
|
// by creating all the buckets again.
|
|
|
|
|
for _, err := range errs { |
|
|
|
|
if err != nil { |
|
|
|
|
if _, ok := err.(InsufficientWriteQuorum); ok { |
|
|
|
|
undoDeleteBucketSets(bucket, s.sets, errs) |
|
|
|
|
} |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Delete all bucket metadata.
|
|
|
|
|
deleteBucketMetadata(bucket, s) |
|
|
|
|