mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
fix: return quorum error upon decode failures (#12184)
This commit is contained in:
parent
336c8ac99f
commit
091845df39
@ -198,6 +198,18 @@ func (p *parallelReader) Read(dst [][]byte) ([][]byte, error) {
|
|||||||
return newBuf, nil
|
return newBuf, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if countErrs(p.errs, nil) == len(p.errs) {
|
||||||
|
// We have success from all drives this can mean that
|
||||||
|
// all local drives succeeded, but all remote drives
|
||||||
|
// failed to read since p.readers[i] was already nil
|
||||||
|
// for such remote servers - this condition was missed
|
||||||
|
// we would return instead `nil, nil` from this
|
||||||
|
// function - it is safer to simply return Quorum error
|
||||||
|
// when all errs are nil but erasure coding cannot decode
|
||||||
|
// the content.
|
||||||
|
return nil, errErasureReadQuorum
|
||||||
|
}
|
||||||
|
|
||||||
return nil, reduceReadQuorumErrs(context.Background(), p.errs, objectOpIgnoredErrs, p.dataBlocks)
|
return nil, reduceReadQuorumErrs(context.Background(), p.errs, objectOpIgnoredErrs, p.dataBlocks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user