pub struct SnapshotRoots {
pub bindings: BTreeSet<(String, String)>,
pub checkpoints: BTreeSet<(String, String)>,
pub lane_heads: BTreeSet<(String, String)>,
}Expand description
Everything that keeps a lane rev alive, kept apart by where the claim came from so cleanup can explain retained disk instead of just retaining it.
Checkpoints are roots even for instances whose binding record has been archived. A checkpoint pointing at a pruned rev is not a smaller store, it is a broken undo.
Fields§
§bindings: BTreeSet<(String, String)>Claimed by a surviving instance’s tracker binding.
checkpoints: BTreeSet<(String, String)>Claimed by any checkpoint record, live or archived.
lane_heads: BTreeSet<(String, String)>Claimed by a lane’s own head (LATEST), which new instances project.
Implementations§
Source§impl SnapshotRoots
impl SnapshotRoots
Sourcepub fn collect(
store: &MetadataStore,
branches: &[BranchInstance],
) -> Result<Self>
pub fn collect( store: &MetadataStore, branches: &[BranchInstance], ) -> Result<Self>
branches is the set of instances that survive the cleanup pass, not
everything on disk — a record about to be archived must not keep its
unreferenced captures alive.
pub fn contains(&self, tracker: &str, rev: &str) -> bool
Sourcepub fn pinned_only_by_checkpoints(
&self,
) -> impl Iterator<Item = &(String, String)>
pub fn pinned_only_by_checkpoints( &self, ) -> impl Iterator<Item = &(String, String)>
Revs held only because some checkpoint references them — the disk a user might otherwise expect cleanup to have reclaimed.
Trait Implementations§
Source§impl Clone for SnapshotRoots
impl Clone for SnapshotRoots
Source§fn clone(&self) -> SnapshotRoots
fn clone(&self) -> SnapshotRoots
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more