mirror of
https://github.com/minio/minio.git
synced 2025-04-21 02:54:24 -04:00
fix: collect quorum errors for deletePrefix() (#19685)
do not return error for single drive being offline.
This commit is contained in:
parent
39633a5581
commit
6a15580817
@ -1808,6 +1808,14 @@ func (er erasureObjects) commitRenameDataDir(ctx context.Context, bucket, object
|
|||||||
|
|
||||||
func (er erasureObjects) deletePrefix(ctx context.Context, bucket, prefix string) error {
|
func (er erasureObjects) deletePrefix(ctx context.Context, bucket, prefix string) error {
|
||||||
disks := er.getDisks()
|
disks := er.getDisks()
|
||||||
|
// Assume (N/2 + 1) quorum for Delete()
|
||||||
|
// this is a theoretical assumption such that
|
||||||
|
// for delete's we do not need to honor storage
|
||||||
|
// class for objects that have reduced quorum
|
||||||
|
// due to storage class - this only needs to be honored
|
||||||
|
// for Read() requests alone that we already do.
|
||||||
|
writeQuorum := len(disks)/2 + 1
|
||||||
|
|
||||||
g := errgroup.WithNErrs(len(disks))
|
g := errgroup.WithNErrs(len(disks))
|
||||||
for index := range disks {
|
for index := range disks {
|
||||||
index := index
|
index := index
|
||||||
@ -1821,12 +1829,9 @@ func (er erasureObjects) deletePrefix(ctx context.Context, bucket, prefix string
|
|||||||
})
|
})
|
||||||
}, index)
|
}, index)
|
||||||
}
|
}
|
||||||
for _, err := range g.Wait() {
|
|
||||||
if err != nil {
|
// return errors if any during deletion
|
||||||
return err
|
return reduceWriteQuorumErrs(ctx, g.Wait(), objectOpIgnoredErrs, writeQuorum)
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteObject - deletes an object, this call doesn't necessary reply
|
// DeleteObject - deletes an object, this call doesn't necessary reply
|
||||||
|
Loading…
x
Reference in New Issue
Block a user