forked from TrueCloudLab/frostfs-node
[#1559] engine: Do not count logical errors as storage ones
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
c8911d72d0
commit
40a56c6b42
3 changed files with 36 additions and 2 deletions
|
@ -3,6 +3,7 @@ package engine
|
|||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
|
@ -21,7 +22,14 @@ func (e *StorageEngine) exists(addr oid.Address) (bool, error) {
|
|||
return true
|
||||
}
|
||||
|
||||
e.reportShardError(sh, "could not check existence of object in shard", err)
|
||||
_, ok := err.(*objectSDK.SplitInfoError)
|
||||
if ok {
|
||||
return true
|
||||
}
|
||||
if !shard.IsErrNotFound(err) {
|
||||
e.reportShardError(sh, "could not check existence of object in shard", err)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
if !exists {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue