[#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
|
@ -6,10 +6,11 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard/mode"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr"
|
||||
)
|
||||
|
||||
// ErrReadOnly is returned when Put/Write is performed in a read-only mode.
|
||||
var ErrReadOnly = errors.New("write-cache is in read-only mode")
|
||||
var ErrReadOnly = logicerr.Wrap(errors.New("write-cache is in read-only mode"))
|
||||
|
||||
// SetMode sets write-cache mode of operation.
|
||||
// When shard is put in read-only mode all objects in memory are flushed to disk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue