diff --git a/go.mod b/go.mod index ad6069bdf..da74aad34 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/multiformats/go-multihash v0.0.13 // indirect github.com/nspcc-dev/hrw v1.0.9 github.com/nspcc-dev/neo-go v0.91.1-pre.0.20201030072836-71216865717b - github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201211081945-1bc91466aa7b + github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201211114827-2aa51d3add29 github.com/nspcc-dev/neofs-crypto v0.3.0 github.com/nspcc-dev/tzhash v1.4.0 github.com/panjf2000/ants/v2 v2.3.0 diff --git a/go.sum b/go.sum index 44eb3324e..e1b32a43f 100644 Binary files a/go.sum and b/go.sum differ diff --git a/pkg/services/object/delete/exec.go b/pkg/services/object/delete/exec.go index 1afc8bbe4..dbe665138 100644 --- a/pkg/services/object/delete/exec.go +++ b/pkg/services/object/delete/exec.go @@ -137,6 +137,7 @@ func (exec *execCtx) collectChain() bool { exec.log.Debug("assembling chain...") for prev := exec.splitInfo.LastPart(); prev != nil; { + chain = append(chain, prev) prev, err = exec.svc.header.previous(exec, prev) switch { @@ -154,12 +155,9 @@ func (exec *execCtx) collectChain() bool { exec.status = statusOK exec.err = nil } - - chain = append(chain, prev) } exec.addMembers(chain) - exec.tombstone.SetSplitID(exec.splitInfo.SplitID()) return true } diff --git a/pkg/services/object/delete/local.go b/pkg/services/object/delete/local.go index 396debd79..26b0d9dde 100644 --- a/pkg/services/object/delete/local.go +++ b/pkg/services/object/delete/local.go @@ -37,6 +37,8 @@ func (exec *execCtx) formTombstone() (ok bool) { exec.log.Debug("split info successfully formed, collecting members...") + exec.tombstone.SetSplitID(exec.splitInfo.SplitID()) + ok = exec.collectMembers() if !ok { return diff --git a/pkg/services/object/delete/util.go b/pkg/services/object/delete/util.go index 7a5da82d1..1a25e9a86 100644 --- a/pkg/services/object/delete/util.go +++ b/pkg/services/object/delete/util.go @@ -99,7 +99,7 @@ func (w *searchSvcWrapper) splitMembers(exec *execCtx) ([]*objectSDK.ID, error) return wr.ids, nil } -func (s simpleIDWriter) WriteIDs(ids []*objectSDK.ID) error { +func (s *simpleIDWriter) WriteIDs(ids []*objectSDK.ID) error { s.ids = append(s.ids, ids...) return nil