[#346] neofs: Fix belated updateCRDT2PSetHeaders
call
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e559312fbf
commit
1517b5c638
1 changed files with 3 additions and 2 deletions
|
@ -67,6 +67,9 @@ func (n *layer) putSystemObjectIntoNeoFS(ctx context.Context, p *PutSystemObject
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idsToDeleteArr := updateCRDT2PSetHeaders(p.Metadata, versions, false) // false means "last write wins"
|
||||||
|
// note that updateCRDT2PSetHeaders modifies p.Metadata and must be called further processing
|
||||||
|
|
||||||
prm := PrmObjectCreate{
|
prm := PrmObjectCreate{
|
||||||
Container: *p.BktInfo.CID,
|
Container: *p.BktInfo.CID,
|
||||||
Creator: *p.BktInfo.Owner,
|
Creator: *p.BktInfo.Owner,
|
||||||
|
@ -99,8 +102,6 @@ func (n *layer) putSystemObjectIntoNeoFS(ctx context.Context, p *PutSystemObject
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
idsToDeleteArr := updateCRDT2PSetHeaders(p.Metadata, versions, false) // false means "last write wins"
|
|
||||||
|
|
||||||
for _, id := range idsToDeleteArr {
|
for _, id := range idsToDeleteArr {
|
||||||
if err = n.objectDelete(ctx, p.BktInfo.CID, id); err != nil {
|
if err = n.objectDelete(ctx, p.BktInfo.CID, id); err != nil {
|
||||||
n.log.Warn("couldn't delete system object",
|
n.log.Warn("couldn't delete system object",
|
||||||
|
|
Loading…
Reference in a new issue