forked from TrueCloudLab/frostfs-node
[#1586] Upgrade NeoFS SDK Go to rc#5
Error checkers now support wrapped errors so there is no need to explicitly unwrap errors in `Policer`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9a11a75b77
commit
fdf62e8562
3 changed files with 2 additions and 8 deletions
4
go.mod
4
go.mod
|
@ -19,8 +19,8 @@ require (
|
|||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220601120906-3bec6657f5c5 // indirect
|
||||
github.com/nspcc-dev/neofs-api-go/v2 v2.13.0
|
||||
github.com/nspcc-dev/neofs-contract v0.15.1
|
||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.4.0.20220705084258-cec2373b50ae
|
||||
github.com/nspcc-dev/tzhash v1.5.2
|
||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.5.0.20220706151041-0d862d8568a4
|
||||
github.com/nspcc-dev/tzhash v1.6.1
|
||||
github.com/panjf2000/ants/v2 v2.4.0
|
||||
github.com/paulmach/orb v0.2.2
|
||||
github.com/prometheus/client_golang v1.11.0
|
||||
|
|
BIN
go.sum
BIN
go.sum
Binary file not shown.
|
@ -2,7 +2,6 @@ package policer
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
|
@ -127,11 +126,6 @@ func (p *Policer) processNodes(ctx *processPlacementContext, addr oid.Address,
|
|||
|
||||
cancel()
|
||||
|
||||
// client.IsErrObjectNotFound doesn't support wrapped errors, so unwrap it
|
||||
for wErr := errors.Unwrap(err); wErr != nil; wErr = errors.Unwrap(err) {
|
||||
err = wErr
|
||||
}
|
||||
|
||||
if client.IsErrObjectNotFound(err) {
|
||||
checkedNodes[nodeID] = false
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue