Skip to main content

pack

Function pack 

Source
pub fn pack(data_dir: &Path, out_path: &Path) -> Result<u64>
Expand description

Pack every regular file under data_dir into out_path. Subdirectories are skipped, and the data dir stopped being flat when tiering landed: tier/<shard>/vlog-*.dat holds demoted values and segs-<shard>/ holds cold index segments. Skipping them is correct because both are derived — a snapshot materialises cold values rather than referencing them, so the backup carries the data without the spill area and a restore rebuilds it — measured end to end against a store whose values had actually been demoted, not reasoned about.

That safety is a property of what lives down there, not of the skip. subdirectories_are_derived_spill_only pins the set, so a future directory of TRUTH cannot join the data dir without someone reading this first.