From 3560394737f5e38689d97e3a27c37bf518d3d9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 29 Feb 2024 15:53:05 +0100 Subject: [PATCH] Record (compressed, uncompressed) digest mapping if we consumed the whole layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar to what putBlobToPendingFile does. Signed-off-by: Miloslav Trmač --- storage/storage_dest.go | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/storage_dest.go b/storage/storage_dest.go index 6d291cdf94..f6882dae5a 100644 --- a/storage/storage_dest.go +++ b/storage/storage_dest.go @@ -335,6 +335,7 @@ func (s *storageImageDestination) PutBlobPartial(ctx context.Context, chunkAcces // responsible for ensuring blobDigest has been validated. // So, record also information about blobDigest, that might benefit reuse. s.lockProtected.blobDiffIDs[blobDigest] = out.UncompressedDigest + options.Cache.RecordDigestUncompressedPair(blobDigest, out.UncompressedDigest) } else { // Don’t identify layers by TOC if UncompressedDigest is available. // - Using UncompressedDigest allows image reuse with non-partially-pulled layers