forked from TrueCloudLab/frostfs-sdk-go
[#95] transformer: Set parent version
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
9d40228cec
commit
aa8ffebc63
1 changed files with 2 additions and 0 deletions
|
@ -82,10 +82,12 @@ func (s *payloadSizeLimiter) initialize() {
|
||||||
if ln := len(s.previous); ln > 0 {
|
if ln := len(s.previous); ln > 0 {
|
||||||
// initialize parent object once (after 1st object)
|
// initialize parent object once (after 1st object)
|
||||||
if ln == 1 {
|
if ln == 1 {
|
||||||
|
ver := version.Current()
|
||||||
s.parent = fromObject(s.current)
|
s.parent = fromObject(s.current)
|
||||||
s.parent.ResetRelations()
|
s.parent.ResetRelations()
|
||||||
s.parent.SetSignature(nil)
|
s.parent.SetSignature(nil)
|
||||||
s.parent.SetAttributes(s.parAttrs...)
|
s.parent.SetAttributes(s.parAttrs...)
|
||||||
|
s.parent.SetVersion(&ver)
|
||||||
s.parentHashers = append(s.parentHashers[:0], s.currentHashers...)
|
s.parentHashers = append(s.parentHashers[:0], s.currentHashers...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue