mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Do not log erasure read failure when disk goes offline (#15277)
Avoid printing the following log ``` API: SYSTEM Time: Fri Jul 08 2022 11:48:40 GMT+0100 Error: Error(disk not found) reading erasure shards at... Backtrace: 0: internal/logger/logger.go:278:logger.LogIf() 1: cmd/bitrot-streaming.go:156:cmd.(*streamingBitrotReader).ReadAt() 2: cmd/erasure-decode.go:165:cmd.(*parallelReader).Read.func1() ```
This commit is contained in:
parent
9f02f51b87
commit
57d1f31054
@ -152,10 +152,10 @@ func (b *streamingBitrotReader) ReadAt(buf []byte, offset int64) (int, error) {
|
||||
streamOffset := (offset/b.shardSize)*int64(b.h.Size()) + offset
|
||||
if len(b.data) == 0 && b.tillOffset != streamOffset {
|
||||
b.rc, err = b.disk.ReadFileStream(context.TODO(), b.volume, b.filePath, streamOffset, b.tillOffset-streamOffset)
|
||||
if err != nil {
|
||||
if err != nil && err != errDiskNotFound {
|
||||
logger.LogIf(GlobalContext,
|
||||
fmt.Errorf("Error(%w) reading erasure shards at (%s: %s/%s), will attempt to reconstruct if we have quorum",
|
||||
err, b.disk, b.volume, b.filePath))
|
||||
fmt.Errorf("Reading erasure shards at (%s: %s/%s) returned '%w', will attempt to reconstruct if we have quorum",
|
||||
b.disk, b.volume, b.filePath, err))
|
||||
}
|
||||
} else {
|
||||
b.rc = io.NewSectionReader(bytes.NewReader(b.data), streamOffset, b.tillOffset-streamOffset)
|
||||
|
Loading…
Reference in New Issue
Block a user