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č <[email protected]>
  • Loading branch information
mtrmac committed Mar 25, 2024
1 parent 85ce7a7 commit 506bacc
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 @@ -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
Expand Down

0 comments on commit 506bacc

Please sign in to comment.