Skip to content

Compact tombstone file when stale entries exceed live set size#25

Merged
congwang-mk merged 1 commit intomainfrom
tombstone-gc
Mar 13, 2026
Merged

Compact tombstone file when stale entries exceed live set size#25
congwang-mk merged 1 commit intomainfrom
tombstone-gc

Conversation

@congwang-mk
Copy link
Contributor

Summary

  • remove_tombstone() previously only removed from memory, leaving stale entries on disk
  • After repeated delete/create cycles on the same paths, the tombstone file grew unbounded
  • Now tracks a stale entry counter and rewrites the file when stale >= max(live_count, 16)
  • set_tombstones() also resets the stale counter after rewrite

Fixes #6

Test plan

  • All 13 test suites pass
  • cargo build --release clean

Fixes #6

Signed-off-by: Cong Wang <cwang@multikernel.io>
@congwang-mk congwang-mk merged commit e038389 into main Mar 13, 2026
4 checks passed
@congwang-mk congwang-mk deleted the tombstone-gc branch March 13, 2026 23:32
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.

Tombstone garbage collection

1 participant