From bf1e59bb83589840066ab7a914cc0cbdf012a5bb Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 15 Feb 2023 12:46:01 +0300 Subject: [PATCH] [#2260] network/cache: Ignore `context cancelled` errors Timeouts on client side should node affect inter-node communication. Signed-off-by: Evgenii Stratonikov --- pkg/network/cache/multi.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/network/cache/multi.go b/pkg/network/cache/multi.go index bf4beab5..96defa7c 100644 --- a/pkg/network/cache/multi.go +++ b/pkg/network/cache/multi.go @@ -12,6 +12,8 @@ import ( "github.com/TrueCloudLab/frostfs-node/pkg/network" "github.com/TrueCloudLab/frostfs-sdk-go/client" "github.com/TrueCloudLab/frostfs-sdk-go/object" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type singleClient struct { @@ -172,6 +174,10 @@ func (x *multiClient) ReportError(err error) { return } + if status.Code(err) == codes.Canceled || errors.Is(err, context.Canceled) { + return + } + // non-status logic error that could be returned // from the SDK client; should not be considered // as a connection error