mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
HealObject should succeed when only N/2 disks have data (#3952)
This commit is contained in:
committed by
Harshavardhana
parent
fbfb4fc5a0
commit
417ec0df56
@@ -41,11 +41,18 @@ func reduceErrs(errs []error, ignoredErrs []error) (maxCount int, maxErr error)
|
||||
}
|
||||
errorCounts[err]++
|
||||
}
|
||||
|
||||
max := 0
|
||||
for err, count := range errorCounts {
|
||||
if max < count {
|
||||
switch {
|
||||
case max < count:
|
||||
max = count
|
||||
maxErr = err
|
||||
|
||||
// Prefer `nil` over other error values with the same
|
||||
// number of occurrences.
|
||||
case max == count && err == nil:
|
||||
maxErr = err
|
||||
}
|
||||
}
|
||||
return max, maxErr
|
||||
|
||||
Reference in New Issue
Block a user