forked from TrueCloudLab/frostfs-s3-gw
[#643] Fix tagging cache
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
bb14041f52
commit
9372534345
1 changed files with 5 additions and 5 deletions
|
@ -16,17 +16,17 @@ func (n *layer) GetObjectTagging(ctx context.Context, p *ObjectVersion) (string,
|
|||
tags map[string]string
|
||||
)
|
||||
|
||||
tags = n.systemCache.GetTagging(objectTaggingCacheKey(p))
|
||||
if tags != nil {
|
||||
return p.VersionID, tags, nil
|
||||
}
|
||||
|
||||
version, err := n.getNodeVersion(ctx, p)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
p.VersionID = version.OID.EncodeToString()
|
||||
|
||||
tags = n.systemCache.GetTagging(objectTaggingCacheKey(p))
|
||||
if tags != nil {
|
||||
return p.VersionID, tags, nil
|
||||
}
|
||||
|
||||
tags, err = n.treeService.GetObjectTagging(ctx, p.BktInfo.CID, version)
|
||||
if err != nil {
|
||||
if errorsStd.Is(err, ErrNodeNotFound) {
|
||||
|
|
Loading…
Reference in a new issue