mirror of
https://github.com/minio/minio.git
synced 2025-04-14 00:09:52 -04:00
drive heal if we have enough success, do not error setList() (#516)
This commit is contained in:
parent
11507d46da
commit
2a3acc4f24
@ -539,7 +539,8 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []string,
|
|||||||
go healEntry(bucket, *entry)
|
go healEntry(bucket, *entry)
|
||||||
},
|
},
|
||||||
finished: func(errs []error) {
|
finished: func(errs []error) {
|
||||||
if countErrs(errs, nil) != len(errs) {
|
success := countErrs(errs, nil)
|
||||||
|
if success < expectedDisks {
|
||||||
retErr = fmt.Errorf("one or more errors reported during listing: %v", errors.Join(errs...))
|
retErr = fmt.Errorf("one or more errors reported during listing: %v", errors.Join(errs...))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1110,7 +1110,7 @@ func listPathRaw(ctx context.Context, opts listPathRawOptions) (err error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
hasErr++
|
hasErr++
|
||||||
errs[i] = err
|
errs[i] = fmt.Errorf("drive: %s returned err: %v", disks[i], err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// If no current, add it.
|
// If no current, add it.
|
||||||
@ -1159,18 +1159,7 @@ func listPathRaw(ctx context.Context, opts listPathRawOptions) (err error) {
|
|||||||
if opts.finished != nil {
|
if opts.finished != nil {
|
||||||
opts.finished(errs)
|
opts.finished(errs)
|
||||||
}
|
}
|
||||||
var combinedErr []string
|
return errors.Join(errs...)
|
||||||
for i, err := range errs {
|
|
||||||
if err != nil {
|
|
||||||
if disks[i] != nil {
|
|
||||||
combinedErr = append(combinedErr,
|
|
||||||
fmt.Sprintf("drive %s returned: %s", disks[i], err))
|
|
||||||
} else {
|
|
||||||
combinedErr = append(combinedErr, err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errors.New(strings.Join(combinedErr, ", "))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Break if all at EOF or error.
|
// Break if all at EOF or error.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user