forked from TrueCloudLab/frostfs-node
[#1589] cache: Do not invalidate clients on context deadline exceeded
This error has almost the same meaning as context canceled. In most of cases it is cuased by RPC timeout, so no need to invalidate cached clients. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
fa08bfa553
commit
a2249b981a
1 changed files with 2 additions and 1 deletions
3
pkg/network/cache/multi.go
vendored
3
pkg/network/cache/multi.go
vendored
|
@ -194,7 +194,8 @@ func (x *multiClient) ReportError(err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if status.Code(err) == codes.Canceled || errors.Is(err, context.Canceled) {
|
if status.Code(err) == codes.Canceled || errors.Is(err, context.Canceled) ||
|
||||||
|
status.Code(err) == codes.DeadlineExceeded || errors.Is(err, context.DeadlineExceeded) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue