fix(snapshot): optimize cleanup with stale pack removal and conditional gc#77
fix(snapshot): optimize cleanup with stale pack removal and conditional gc#77riatzukiza wants to merge 2 commits intofix/snapshot-phase2-hardeningfrom
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
11f6f7e to
d3b4751
Compare
d3b4751 to
78c5ff5
Compare
Issue for this PR
Closes #74
Type of change
What does this PR do?
This phase replaces unconditional heavy cleanup with threshold-driven maintenance. It removes stale
tmp_pack_*artifacts under lock, runsgc --autoonly when loose objects are high, and only escalates to prune when pack count remains elevated.How did you verify your code works?
bun test test/snapshot/snapshot.test.tsfrompackages/opencode.tmp_pack_*cleanup and low-loose-object behavior tests pass.Screenshots / recordings
N/A (non-UI change).
Checklist