From 9372534345a31a5891194a6bce6aaeda17ea8e6d Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Thu, 4 Aug 2022 01:26:14 +0400 Subject: [PATCH] [#643] Fix tagging cache Signed-off-by: Angira Kekteeva --- api/layer/tagging.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/layer/tagging.go b/api/layer/tagging.go index a86670e35..3d7159fd4 100644 --- a/api/layer/tagging.go +++ b/api/layer/tagging.go @@ -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) {