forked from TrueCloudLab/frostfs-node
[#243] service/object: Fix object chain assembly for tombstone body
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
9265e31e65
commit
a01262d8bd
5 changed files with 5 additions and 5 deletions
2
go.mod
2
go.mod
|
@ -17,7 +17,7 @@ require (
|
||||||
github.com/multiformats/go-multihash v0.0.13 // indirect
|
github.com/multiformats/go-multihash v0.0.13 // indirect
|
||||||
github.com/nspcc-dev/hrw v1.0.9
|
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/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/neofs-crypto v0.3.0
|
||||||
github.com/nspcc-dev/tzhash v1.4.0
|
github.com/nspcc-dev/tzhash v1.4.0
|
||||||
github.com/panjf2000/ants/v2 v2.3.0
|
github.com/panjf2000/ants/v2 v2.3.0
|
||||||
|
|
BIN
go.sum
BIN
go.sum
Binary file not shown.
|
@ -137,6 +137,7 @@ func (exec *execCtx) collectChain() bool {
|
||||||
exec.log.Debug("assembling chain...")
|
exec.log.Debug("assembling chain...")
|
||||||
|
|
||||||
for prev := exec.splitInfo.LastPart(); prev != nil; {
|
for prev := exec.splitInfo.LastPart(); prev != nil; {
|
||||||
|
chain = append(chain, prev)
|
||||||
prev, err = exec.svc.header.previous(exec, prev)
|
prev, err = exec.svc.header.previous(exec, prev)
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
@ -154,12 +155,9 @@ func (exec *execCtx) collectChain() bool {
|
||||||
exec.status = statusOK
|
exec.status = statusOK
|
||||||
exec.err = nil
|
exec.err = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
chain = append(chain, prev)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exec.addMembers(chain)
|
exec.addMembers(chain)
|
||||||
exec.tombstone.SetSplitID(exec.splitInfo.SplitID())
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,8 @@ func (exec *execCtx) formTombstone() (ok bool) {
|
||||||
|
|
||||||
exec.log.Debug("split info successfully formed, collecting members...")
|
exec.log.Debug("split info successfully formed, collecting members...")
|
||||||
|
|
||||||
|
exec.tombstone.SetSplitID(exec.splitInfo.SplitID())
|
||||||
|
|
||||||
ok = exec.collectMembers()
|
ok = exec.collectMembers()
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
|
|
|
@ -99,7 +99,7 @@ func (w *searchSvcWrapper) splitMembers(exec *execCtx) ([]*objectSDK.ID, error)
|
||||||
return wr.ids, nil
|
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...)
|
s.ids = append(s.ids, ids...)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue