From d15199c5d81748cf31a01b56ecdfdad2cf75520c Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 16 Aug 2023 10:39:41 +0300 Subject: [PATCH] [#596] engine: Consider context errors as logical Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/engine/engine.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/local_object_storage/engine/engine.go b/pkg/local_object_storage/engine/engine.go index 7bc84e6c9..bb0b682d6 100644 --- a/pkg/local_object_storage/engine/engine.go +++ b/pkg/local_object_storage/engine/engine.go @@ -1,6 +1,7 @@ package engine import ( + "context" "errors" "sync" "sync/atomic" @@ -196,7 +197,7 @@ func (e *StorageEngine) reportShardErrorWithFlags( } func isLogical(err error) bool { - return errors.As(err, &logicerr.Logical{}) + return errors.As(err, &logicerr.Logical{}) || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) } // Option represents StorageEngine's constructor option. -- 2.45.2