Skip to content

Write extent tombstones only for extents that exist - #625

Merged
Barre merged 2 commits into
Barre:mainfrom
GlazingAlgorithm:trim-fix
Sep 16, 2026
Merged

Barre merged 2 commits into
Barre:mainfrom
GlazingAlgorithm:trim-fix

Conversation

@GlazingAlgorithm

Copy link
Copy Markdown
Contributor

Hi Pierre, great project!

I recently encountered an issue while trimming a large block device on NBD. Currently, a trim writes one tombstone per 32k extent in the requested range, regardless of whether the extent has a key. Because Bloom filters count every row, SSTs become bloated with filter blocks of hundreds of MBs when trimming large sparse devices.

File-range deletes are affected by the same issue.

In this fix we reuse the existing range scan (used for debiting) to determine which extents actually need to be deleted.

Thank you for your work!

@cla-assistant

cla-assistant Bot commented Sep 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Sep 14, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.24%. Comparing base (5377066) to head (d09b5ed).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #625      +/-   ##
==========================================
+ Coverage   83.23%   83.24%   +0.01%     
==========================================
  Files         104      104              
  Lines       47003    47048      +45     
==========================================
+ Hits        39122    39167      +45     
  Misses       7881     7881              
Files with missing lines Coverage Δ
zerofs/src/db.rs 86.11% <100.00%> (+0.05%) ⬆️
zerofs/src/fs/store/extent/write.rs 94.48% <100.00%> (+0.15%) ⬆️

... and 3 files with indirect coverage changes

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

@Barre

Barre commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Looks great, thanks.

@Barre
Barre merged commit cfc5e15 into Barre:main Sep 16, 2026
115 checks passed
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.

2 participants