|
|
@ -608,7 +608,7 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Initialize parts metadata
|
|
|
|
// Initialize parts metadata
|
|
|
|
partsMetadata := make([]FileInfo, len(er.getDisks())) |
|
|
|
partsMetadata := make([]FileInfo, len(storageDisks)) |
|
|
|
|
|
|
|
|
|
|
|
fi := newFileInfo(object, dataDrives, parityDrives) |
|
|
|
fi := newFileInfo(object, dataDrives, parityDrives) |
|
|
|
|
|
|
|
|
|
|
@ -767,19 +767,18 @@ func (er erasureObjects) deleteObjectVersion(ctx context.Context, bucket, object |
|
|
|
// all the disks in parallel, including `xl.meta` associated with the
|
|
|
|
// all the disks in parallel, including `xl.meta` associated with the
|
|
|
|
// object.
|
|
|
|
// object.
|
|
|
|
func (er erasureObjects) deleteObject(ctx context.Context, bucket, object string, writeQuorum int) error { |
|
|
|
func (er erasureObjects) deleteObject(ctx context.Context, bucket, object string, writeQuorum int) error { |
|
|
|
var disks []StorageAPI |
|
|
|
|
|
|
|
var err error |
|
|
|
var err error |
|
|
|
defer ObjectPathUpdated(pathJoin(bucket, object)) |
|
|
|
defer ObjectPathUpdated(pathJoin(bucket, object)) |
|
|
|
|
|
|
|
|
|
|
|
tmpObj := mustGetUUID() |
|
|
|
tmpObj := mustGetUUID() |
|
|
|
|
|
|
|
disks := er.getDisks() |
|
|
|
if bucket == minioMetaTmpBucket { |
|
|
|
if bucket == minioMetaTmpBucket { |
|
|
|
tmpObj = object |
|
|
|
tmpObj = object |
|
|
|
disks = er.getDisks() |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Rename the current object while requiring write quorum, but also consider
|
|
|
|
// Rename the current object while requiring write quorum, but also consider
|
|
|
|
// that a non found object in a given disk as a success since it already
|
|
|
|
// that a non found object in a given disk as a success since it already
|
|
|
|
// confirms that the object doesn't have a part in that disk (already removed)
|
|
|
|
// confirms that the object doesn't have a part in that disk (already removed)
|
|
|
|
disks, err = rename(ctx, er.getDisks(), bucket, object, minioMetaTmpBucket, tmpObj, true, writeQuorum, |
|
|
|
disks, err = rename(ctx, disks, bucket, object, minioMetaTmpBucket, tmpObj, true, writeQuorum, |
|
|
|
[]error{errFileNotFound}) |
|
|
|
[]error{errFileNotFound}) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return toObjectErr(err, bucket, object) |
|
|
|
return toObjectErr(err, bucket, object) |
|
|
@ -787,7 +786,6 @@ func (er erasureObjects) deleteObject(ctx context.Context, bucket, object string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
g := errgroup.WithNErrs(len(disks)) |
|
|
|
g := errgroup.WithNErrs(len(disks)) |
|
|
|
|
|
|
|
|
|
|
|
for index := range disks { |
|
|
|
for index := range disks { |
|
|
|
index := index |
|
|
|
index := index |
|
|
|
g.Go(func() error { |
|
|
|
g.Go(func() error { |
|
|
|