mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
fix(s3): fix check in dedupe logic (#2700)
cache.HasBlob() looks in both buckets: duplicates and original blobs Because we want to check if the blob is in original bucket let's use cache.GetBlob() because it's looking only in original bucket. Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>
This commit is contained in:
parent
e6624a29a5
commit
513f2a0dc9
1 changed files with 1 additions and 1 deletions
|
@ -1930,7 +1930,7 @@ func (is *ImageStore) dedupeBlobs(ctx context.Context, digest godigest.Digest, d
|
|||
}
|
||||
|
||||
// cache original blob
|
||||
if ok := is.cache.HasBlob(digest, originalBlob); !ok {
|
||||
if _, err := is.cache.GetBlob(digest); err != nil {
|
||||
if err := is.cache.PutBlob(digest, originalBlob); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue