[#2260] network/cache: Ignore `context cancelled` errors

Timeouts on client side should node affect inter-node communication.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
pull/62/head
Evgenii Stratonikov 2023-02-15 12:46:01 +03:00 committed by fyrchik
parent 2567f8020e
commit bf1e59bb83
1 changed files with 6 additions and 0 deletions

View File

@ -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