MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / has_visible_deleted_edge

Method has_visible_deleted_edge

atomic-core/src/pristine/txn/read.rs:2565–2570  ·  view source on GitHub ↗

Whether any pre-loaded edge for this inode is a DELETED edge whose introducing change is in the validated visibility closure. Distinguishes "content was deleted on this view" from "file is empty / has no visible content": a file recorded empty carries no visible DELETED edges, while a (partially or fully) deleted file does. Used by materialize to decide when a stale on-disk file whose visible con

(&self, visibility: &GraphVisibilityClosure)

Source from the content-addressed store, hash-verified

2563 /// does. Used by materialize to decide when a stale on-disk file whose
2564 /// visible content vanished should be removed.
2565 pub fn has_visible_deleted_edge(&self, visibility: &GraphVisibilityClosure) -> bool {
2566 self.edges.values().flatten().any(|edge| {
2567 edge.flag().contains(crate::types::EdgeFlags::DELETED)
2568 && visibility.contains(edge.introduced_by())
2569 })
2570 }
2571}
2572
2573impl<'txn> GraphTxnT for InodePreloadTxn<'txn> {

Callers

nothing calls this directly

Calls 3

flagMethod · 0.80
containsMethod · 0.45
introduced_byMethod · 0.45

Tested by

no test coverage detected