Stats vacuum command - #1462
Merged
Merged
Conversation
--include_projects excluded included projects from the live-file safety check, allowing datablocks to be vacuumed while still in use. Fix by splitting orphaned datablock queries into explicit _for_vacuum and _for_stats Remove --include_projects from the vacuum command entirely. Improve ledger_stats output to distinguish datablocks ready to vacuum from those blocked by live files in other projects.
…into stats-vacuum-command
graft
reviewed
Mar 25, 2026
amadeovezz
commented
Mar 25, 2026
| --- | ||
|
|
||
| - This backfills all links for a given project. | ||
| ## Vacuum Eligibility |
Contributor
Author
There was a problem hiding this comment.
here is all our vacuum eligibility in english - would be good to have ya review and make sure we havent missed anything
Contributor
There was a problem hiding this comment.
can we move this stuff to a decision document? seems more appropriate there than in this README...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO
blacklistedcolumn to data block (previouslydeleted)deletedcolumn in vacuuming logicevent_metato ledger to track interesting events (currently tracking upload times)RESTORE_DATABLOCKevent to track datablocks that have been deleted, but then later re-OTHER
web-down,metis-clearto Makefile-macDATABLOCK REMOVE LOGIC
Problem:
When a data block is vacuumed, it's marked as removed: true. If someone later uploads a file with the same content, the compute_hash! method would find the removed block and try to reuse it, causing files to point to a "removed" block.
Solution
If we find a removed datablock during hash creation, set it back to true.
MANUAL CHECKS
Backfill
Check
data_block_ledger,data_blocksas you move through:Single project single file delete
add linkcommand. Runadd unlinkcommand. Make sure file that was deleted can be reported as vacuumed.Single project multi file delete block
add linkcommand. Runadd unlinkcommand. Make sure file that could not be deleted.Multi project delete
add linkcommand. Runadd unlinkcommand. Run Vacuum. That file should be able to be deleted.Multi project block
add linkcommand. Runadd unlinkcommand. Deleted file should be allowed to be vacuumedNo temp files delete
add linkcommand. Runadd unlinkcommand. Run Vacuum. No files should be deleted