forked from TrueCloudLab/frostfs-s3-gw
[#682] Return added node id in AddVersion
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
parent
a28d6b64b9
commit
9590b39333
5 changed files with 14 additions and 16 deletions
|
@ -250,7 +250,7 @@ func (n *layer) PutObject(ctx context.Context, p *PutObjectParams) (*data.Object
|
|||
|
||||
newVersion.OID = id
|
||||
newVersion.ETag = hex.EncodeToString(hash)
|
||||
if err = n.treeService.AddVersion(ctx, p.BktInfo.CID, newVersion); err != nil {
|
||||
if newVersion.ID, err = n.treeService.AddVersion(ctx, p.BktInfo.CID, newVersion); err != nil {
|
||||
return nil, fmt.Errorf("couldn't add new verion to tree service: %w", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue