crab metadb
Administer the local and durable metadata databases used by Crab's chunk and repository indexes.
Synopsis
crab metadb <SUBCOMMAND> [OPTIONS]Subcommands
| Command | Purpose |
|---|---|
diagnose | Print sys:* key snapshots for one or both databases |
rebuild | Validate manifest-named shards and packs, then rebuild generation-bound index evidence |
owner | Continuously publish Git locator checkpoints and visibility proofs |
compact | Run SlateDB's size-tiered compactor until current eligible work drains |
cache | Inspect or transactionally clear the local chunk-index cache |
Use the subcommand's --help output for database selectors and cache-specific
options. Rebuild and cache-clear operations can be expensive; run diagnostics
first and keep a backup of the durable remote data.
compact holds a renewable repository maintenance lease and exits non-zero on
cancellation, an already-active compaction, or a new SlateDB compaction failure.
cache stats is read-only; cache clear preserves the SQLite file, schema, and
GC cursor while removing cached chunk and shard rows.
rebuild streams each manifest-named Xet shard through a temporary maintenance
file, verifies its content hash, and parses only the selected index sections.
This keeps full shard bodies out of the rebuild process heap; selecting one
database also avoids decoding the other index.
crab metadb diagnose
crab metadb owner --once
crab metadb cache stats
crab metadb compactFor a team repository, run one continuous owner from a supervised checkout:
crab metadb owner --interval 30 --jsonlPush clients then hand generation-bound Git locator publication to that owner.
The default idle polling cost is 2,880 manifest reads per repository per day,
plus two renewable object-store leases and a ten-minute visibility-evidence
revalidation. Increase --interval when storage request cost matters more than
the delay before protocol-v2 fetch becomes available for a new generation.