[#596] engine: Consider context errors as logical

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-08-16 10:39:41 +03:00
parent bc425b5bad
commit d15199c5d8

View file

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