Skip to content

Commit

Permalink
Record (compressed, uncompressed) digest mapping if we consumed the w…
Browse files Browse the repository at this point in the history
…hole layer

This is similar to what putBlobToPendingFile does.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Apr 22, 2024
1 parent fbabdeb commit 9c1bda1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storage/storage_dest.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,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
Expand Down

0 comments on commit 9c1bda1

Please sign in to comment.