mirror of
https://github.com/minio/minio.git
synced 2025-01-25 13:43:17 -05:00
avoid printing io.ErrUnexpectedEOF for .metacache objects (#15642)
This commit is contained in:
parent
240164560f
commit
5ea629beb2
@ -502,17 +502,26 @@ func readAllXL(ctx context.Context, disks []StorageAPI, bucket, object string, r
|
|||||||
}, index)
|
}, index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ignoredErrs := []error{
|
||||||
|
errFileNotFound,
|
||||||
|
errVolumeNotFound,
|
||||||
|
errFileVersionNotFound,
|
||||||
|
errDiskNotFound,
|
||||||
|
}
|
||||||
|
|
||||||
errs := g.Wait()
|
errs := g.Wait()
|
||||||
for index, err := range errs {
|
for index, err := range errs {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if !IsErr(err, []error{
|
if bucket == minioMetaBucket {
|
||||||
errFileNotFound,
|
// minioMetaBucket "reads" for .metacache are not written with O_SYNC
|
||||||
errVolumeNotFound,
|
// so there is a potential for them to not fully committed to stable
|
||||||
errFileVersionNotFound,
|
// storage leading to unexpected EOFs. Allow these failures to
|
||||||
errDiskNotFound,
|
// be ignored since the caller already ignores them in streamMetadataParts()
|
||||||
}...) {
|
ignoredErrs = append(ignoredErrs, io.ErrUnexpectedEOF, io.EOF)
|
||||||
|
}
|
||||||
|
if !IsErr(err, ignoredErrs...) {
|
||||||
logger.LogOnceIf(ctx, fmt.Errorf("Drive %s, path (%s/%s) returned an error (%w)",
|
logger.LogOnceIf(ctx, fmt.Errorf("Drive %s, path (%s/%s) returned an error (%w)",
|
||||||
disks[index], bucket, object, err),
|
disks[index], bucket, object, err),
|
||||||
disks[index].String())
|
disks[index].String())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user