MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / unlink_segment

Method unlink_segment

nodedb/src/engine/array/store/catalog.rs:191–200  ·  view source on GitHub ↗
(&self, id: &str)

Source from the content-addressed store, hash-verified

189 }
190
191 pub fn unlink_segment(&self, id: &str) -> Result<(), ArrayStoreError> {
192 let path = segment_path(&self.root, id);
193 match std::fs::remove_file(&path) {
194 Ok(()) => Ok(()),
195 Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()),
196 Err(e) => Err(ArrayStoreError::Io {
197 detail: format!("unlink {path:?}: {e}"),
198 }),
199 }
200 }
201
202 /// Run the MBR predicate against every segment + the memtable.
203 /// Returns decoded tile payloads in segment-then-memtable order.

Callers 3

maybe_compactMethod · 0.80
rewrite_segmentFunction · 0.80
remove_segmentFunction · 0.80

Calls 2

kindMethod · 0.80
segment_pathFunction · 0.70

Tested by

no test coverage detected