mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
xl: Avoid marking a drive offline after one part read failure (#19779)
This commit will fix one rare case of a multipart object that can be read in theory but GetObject API returned an error. It turned out that a six years old code was marking a drive offline when the bitrot streaming fails to read a part in a disk with any error. This can affect reading a subsequent part, though having enough shards, but unable to construct because one drive was marked offline earlier. This commit will remove the drive marking offline code. It will also close the bitrotstreaming reader before marking it as nil.
This commit is contained in:
parent
63e1ad9f29
commit
bf1769d3e0
@ -202,6 +202,9 @@ func (p *parallelReader) Read(dst [][]byte) ([][]byte, error) {
|
||||
|
||||
// This will be communicated upstream.
|
||||
p.orgReaders[bufIdx] = nil
|
||||
if br, ok := p.readers[i].(io.Closer); ok {
|
||||
br.Close()
|
||||
}
|
||||
p.readers[i] = nil
|
||||
|
||||
// Since ReadAt returned error, trigger another read.
|
||||
|
@ -425,11 +425,6 @@ func (er erasureObjects) getObjectWithFileInfo(ctx context.Context, bucket, obje
|
||||
return toObjectErr(err, bucket, object)
|
||||
}
|
||||
}
|
||||
for i, r := range readers {
|
||||
if r == nil {
|
||||
onlineDisks[i] = OfflineDisk
|
||||
}
|
||||
}
|
||||
// Track total bytes read from disk and written to the client.
|
||||
totalBytesRead += partLength
|
||||
// partOffset will be valid only for the first part, hence reset it to 0 for
|
||||
|
Loading…
Reference in New Issue
Block a user