forked from TrueCloudLab/frostfs-node
[#85] get-service: Fix corrupted chain logic
Should return an error in case of a broken LOB reference chain. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
2886b1581b
commit
07de839f18
3 changed files with 19 additions and 15 deletions
|
@ -1,6 +1,8 @@
|
|||
package getsvc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
|
@ -90,6 +92,7 @@ func (exec *execCtx) initFromChild(obj oid.ID) (prev *oid.ID, children []oid.ID)
|
|||
par := child.Parent()
|
||||
if par == nil {
|
||||
exec.status = statusUndefined
|
||||
exec.err = errors.New("received child with empty parent")
|
||||
|
||||
log.Debug("received child with empty parent")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue