Skip to content

Commit

Permalink
Merge pull request #2168 from flouthoc/CandidateLocations2-process-al…
Browse files Browse the repository at this point in the history
…l-blobs

blobinfocache,sqlite: remove unnecessary compression check
  • Loading branch information
mtrmac committed Nov 1, 2023
2 parents 6c186a9 + e405750 commit f71ae82
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/blobinfocache/sqlite/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,15 @@ func (sqc *cache) appendReplacementCandidates(candidates []prioritize.CandidateW
}

if len(res) == 0 && v2Output {
compressorName := blobinfocache.UnknownCompression
compressor, found, err := querySingleValue[string](tx, "SELECT compressor FROM DigestCompressors WHERE digest = ?", digest.String())
if err != nil {
return nil, fmt.Errorf("scanning compressorName: %w", err)
}
if found {
compressorName = compressor
}
if compressorName != blobinfocache.UnknownCompression {
res = append(res, prioritize.CandidateWithTime{
Candidate: blobinfocache.BICReplacementCandidate2{
Digest: digest,
CompressorName: compressorName,
CompressorName: compressor,
UnknownLocation: true,
Location: types.BICLocationReference{Opaque: ""},
},
Expand Down

0 comments on commit f71ae82

Please sign in to comment.