pub struct SweepPlan {Show 14 fields
pub scanned: usize,
pub loose_present: usize,
pub packed_present: usize,
pub live: usize,
pub garbage: usize,
pub loose_garbage: Vec<Hash>,
pub loose_garbage_bytes: u64,
pub packs_with_garbage: usize,
pub packed_garbage_objects: usize,
pub packs_to_remove: Vec<PathBuf>,
pub packs_to_rewrite: Vec<PackRewrite>,
pub orphan_files: Vec<PathBuf>,
pub unreadable_packs: Vec<PathBuf>,
pub bytes_reclaimable: u64,
}Expand description
The result of enumerating the store and classifying garbage.
Produced by plan_sweep; embedded in SweepReport. Byte counts
are on-disk sizes (compressed bytes for zstd builds).
Fields§
§scanned: usizeDistinct objects physically present (loose ∪ packed).
loose_present: usizeObjects with a loose copy.
packed_present: usizeDistinct objects with at least one packed copy.
live: usizeLive objects actually present (live ∩ scanned).
garbage: usizeGarbage objects: scanned − live, the sweep target.
loose_garbage: Vec<Hash>Garbage objects with a loose copy, sorted. Each entry is one removable file.
loose_garbage_bytes: u64On-disk bytes of Self::loose_garbage files.
packs_with_garbage: usizePacks containing at least one garbage object (before the coverage rule decides remove-vs-rewrite).
packed_garbage_objects: usizeGarbage objects with at least one packed copy, counted once per
pack that holds them (a hash packed twice counts twice, and a
hash with both loose and packed garbage copies is counted here
and in Self::loose_garbage). Self::garbage remains the
distinct total.
packs_to_remove: Vec<PathBuf>Packs removed outright (all garbage, or live contents fully covered elsewhere), sorted.
packs_to_rewrite: Vec<PackRewrite>Packs to be rewritten without their garbage.
orphan_files: Vec<PathBuf>Files in the pack directory that cannot ever be read: a .pack
without .idx or an .idx without a .pack. Swept like garbage.
unreadable_packs: Vec<PathBuf>Packs whose .idx failed to load. Their contents are unknown, so
they are never touched — deleting one could destroy live data.
Investigate manually.
bytes_reclaimable: u64Exact on-disk bytes reclaimable by deleting loose garbage and
removed packs. Pack rewrites are excluded: their savings depend
on recompression and are only known after execution (see
SweepReport::bytes_reclaimed).