mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 05:00:22 +03:00
XL/Selfheal: skip reading from disk if ReadFile had returned error. (#1575)
This commit is contained in:
committed by
Harshavardhana
parent
c314a98c1a
commit
409e09c1e5
@@ -117,6 +117,10 @@ func (xl XL) healFile(volume string, path string) error {
|
|||||||
// Skip reading if the part needs healing.
|
// Skip reading if the part needs healing.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if reader == nil {
|
||||||
|
// If ReadFile() had returned error, do not read from this disk.
|
||||||
|
continue
|
||||||
|
}
|
||||||
_, err = io.ReadFull(reader, enBlocks[index])
|
_, err = io.ReadFull(reader, enBlocks[index])
|
||||||
if err != nil && err != io.ErrUnexpectedEOF {
|
if err != nil && err != io.ErrUnexpectedEOF {
|
||||||
enBlocks[index] = nil
|
enBlocks[index] = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user