forked from TrueCloudLab/frostfs-node
[#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
|
@ -5,6 +5,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr"
|
||||
"go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@ -16,7 +17,7 @@ var versionKey = []byte("version")
|
|||
// ErrOutdatedVersion is returned on initializing
|
||||
// an existing metabase that is not compatible with
|
||||
// the current code version.
|
||||
var ErrOutdatedVersion = errors.New("invalid version, resynchronization is required")
|
||||
var ErrOutdatedVersion = logicerr.Wrap(errors.New("invalid version, resynchronization is required"))
|
||||
|
||||
func checkVersion(tx *bbolt.Tx, initialized bool) error {
|
||||
var knownVersion bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue