Skip to content

Fix garbage_ratio_pct truncation for chunks with very few defrag blocks - #441

Merged
xiaoxichen merged 1 commit into
eBay:stable/v4.xfrom
xiaoxichen:quick-fix
Jun 24, 2026
Merged

Fix garbage_ratio_pct truncation for chunks with very few defrag blocks#441
xiaoxichen merged 1 commit into
eBay:stable/v4.xfrom
xiaoxichen:quick-fix

Conversation

@xiaoxichen

Copy link
Copy Markdown
Collaborator

Use float instead of uint32_t for garbage_ratio_pct so that chunks with a small defrag_blks count (e.g. 1 block out of 200) are not silently rounded to 0 and excluded from GC even when gc_thresh is set to 0.

Use float instead of uint32_t for garbage_ratio_pct so that chunks with
a small defrag_blks count (e.g. 1 block out of 200) are not silently
rounded to 0 and excluded from GC even when gc_thresh is set to 0.

Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
@xiaoxichen
xiaoxichen requested a review from JacksonYao287 June 24, 2026 09:39

@JacksonYao287 JacksonYao287 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xiaoxichen
xiaoxichen merged commit b891e86 into eBay:stable/v4.x Jun 24, 2026
24 of 25 checks passed
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (stable/v4.x@9b51a62). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff               @@
##             stable/v4.x     #441   +/-   ##
==============================================
  Coverage               ?   54.15%           
==============================================
  Files                  ?       36           
  Lines                  ?     5423           
  Branches               ?      687           
==============================================
  Hits                   ?     2937           
  Misses                 ?     2183           
  Partials               ?      303           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants