[#1969] local_object_storage: Add a type for logical errors
All logic errors are wrapped in `logicerr.Logical` type and do not affect shard error counter. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
98034005f1
commit
fcdbf5e509
42 changed files with 206 additions and 139 deletions
|
@ -4,14 +4,15 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard/mode"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr"
|
||||
)
|
||||
|
||||
// ErrReadOnlyMode is returned when it is impossible to apply operation
|
||||
// that changes shard's memory due to the "read-only" shard's mode.
|
||||
var ErrReadOnlyMode = errors.New("shard is in read-only mode")
|
||||
var ErrReadOnlyMode = logicerr.Wrap(errors.New("shard is in read-only mode"))
|
||||
|
||||
// ErrDegradedMode is returned when operation requiring metabase is executed in degraded mode.
|
||||
var ErrDegradedMode = errors.New("shard is in degraded mode")
|
||||
var ErrDegradedMode = logicerr.Wrap(errors.New("shard is in degraded mode"))
|
||||
|
||||
// SetMode sets mode of the shard.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue