Skip to content

Commit

Permalink
cache: don’t link blobonly based on chainid
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <[email protected]>
(cherry picked from commit 99bd0d8)
  • Loading branch information
tonistiigi committed Feb 13, 2023
1 parent 4fe7d93 commit 522d28e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cache/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,8 @@ func (cm *cacheManager) GetByBlob(ctx context.Context, desc ocispecs.Descriptor,

id := identity.NewID()
snapshotID := chainID.String()
blobOnly := true
if link != nil {
snapshotID = link.getSnapshotID()
blobOnly = link.getBlobOnly()
go link.Release(context.TODO())
}

Expand Down Expand Up @@ -289,7 +287,7 @@ func (cm *cacheManager) GetByBlob(ctx context.Context, desc ocispecs.Descriptor,
rec.queueChainID(chainID)
rec.queueBlobChainID(blobChainID)
rec.queueSnapshotID(snapshotID)
rec.queueBlobOnly(blobOnly)
rec.queueBlobOnly(true)
rec.queueMediaType(desc.MediaType)
rec.queueBlobSize(desc.Size)
rec.appendURLs(desc.URLs)
Expand Down

0 comments on commit 522d28e

Please sign in to comment.