mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
utils: reduceErrs returns and validates quorum errors. (#3300)
This is needed as explained by @krisis
Lets say we have following errors.
```
[]error{nil, errFileNotFound, errDiskAccessDenied, errDiskAccesDenied}
```
Since the last two errors are filtered, the maximum is nil,
depending on map order.
Let's say we get nil from reduceErr. Clearly at this point
we don't have quorum nodes agreeing about the data and since
GetObject only requires N/2 (Read quorum) and isDiskQuorum
would have returned true. This is problematic and can lead to
undersiable consequences.
Fixes #3298
This commit is contained in:
@@ -124,7 +124,7 @@ func newXLObjects(storageDisks []StorageAPI) (ObjectLayer, error) {
|
||||
xl.writeQuorum = writeQuorum
|
||||
|
||||
// Do a quick heal on the buckets themselves for any discrepancies.
|
||||
if err := quickHeal(xl.storageDisks, xl.writeQuorum); err != nil {
|
||||
if err := quickHeal(xl.storageDisks, xl.writeQuorum, xl.readQuorum); err != nil {
|
||||
return xl, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user