From 9f7044aed0d3429775ec02087c2e662b5b70daf1 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 11 Sep 2023 15:29:59 -0700 Subject: [PATCH] fix: ignore transient errors in read path (#18006) Errors such as ``` returned an error (context deadline exceeded) (*fmt.wrapError) ``` ``` (msgp: too few bytes left to read object) (*fmt.wrapError) ``` --- cmd/erasure-object.go | 4 ++++ cmd/erasure.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/erasure-object.go b/cmd/erasure-object.go index c86901f4d..9c2b39161 100644 --- a/cmd/erasure-object.go +++ b/cmd/erasure-object.go @@ -46,6 +46,7 @@ import ( "github.com/minio/pkg/v2/mimedb" "github.com/minio/pkg/v2/sync/errgroup" "github.com/minio/pkg/v2/wildcard" + "github.com/tinylib/msgp/msgp" uatomic "go.uber.org/atomic" ) @@ -578,6 +579,9 @@ func readAllXL(ctx context.Context, disks []StorageAPI, bucket, object string, r errFileVersionNotFound, io.ErrUnexpectedEOF, // some times we would read without locks, ignore these errors io.EOF, // some times we would read without locks, ignore these errors + msgp.ErrShortBytes, + context.DeadlineExceeded, + context.Canceled, } ignoredErrs = append(ignoredErrs, objectOpIgnoredErrs...) diff --git a/cmd/erasure.go b/cmd/erasure.go index 3cfd53fd4..34103acb5 100644 --- a/cmd/erasure.go +++ b/cmd/erasure.go @@ -182,7 +182,6 @@ func getDisksInfo(disks []StorageAPI, endpoints []Endpoint) (disksInfo []madmin. DiskIndex: endpoints[index].DiskIdx, } if disks[index] == OfflineDisk { - logger.LogOnceIf(GlobalContext, fmt.Errorf("%s: %s", errDiskNotFound, endpoints[index]), "get-disks-info-offline-"+di.Endpoint) di.State = diskErrToDriveState(errDiskNotFound) disksInfo[index] = di return nil