forked from TrueCloudLab/frostfs-node
[#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>
This commit is contained in:
parent
2567f8020e
commit
bf1e59bb83
1 changed files with 6 additions and 0 deletions
6
pkg/network/cache/multi.go
vendored
6
pkg/network/cache/multi.go
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue