harbor icon indicating copy to clipboard operation
harbor copied to clipboard

fix: Add distinct to query that is causing high CPU on retention jobs

Open bbytheway-rq opened this issue 3 weeks ago • 1 comments

fixes #22319

Adds a distinct keyword to ensure the query get only the unique digests, not repeated rows for every time the blob is used by multiple artifacts.

bbytheway-rq avatar Dec 10 '25 21:12 bbytheway-rq

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 65.84%. Comparing base (c8c11b4) to head (ca94c4d). :warning: Report is 606 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22634       +/-   ##
===========================================
+ Coverage   45.36%   65.84%   +20.48%     
===========================================
  Files         244     1073      +829     
  Lines       13333   116095   +102762     
  Branches     2719     2931      +212     
===========================================
+ Hits         6049    76448    +70399     
- Misses       6983    35408    +28425     
- Partials      301     4239     +3938     
Flag Coverage Δ
unittests 65.84% <100.00%> (+20.48%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/pkg/blob/dao/dao.go 58.13% <100.00%> (ø)

... and 986 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 11 '25 13:12 codecov[bot]