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

Method remove_segment

nodedb-columnar/src/pk_index.rs:138–140  ·  view source on GitHub ↗

Remove all entries pointing to a given segment (used when dropping a segment).

(&mut self, segment_id: u64)

Source from the content-addressed store, hash-verified

136
137 /// Remove all entries pointing to a given segment (used when dropping a segment).
138 pub fn remove_segment(&mut self, segment_id: u64) {
139 self.inner.retain(|_, loc| loc.segment_id != segment_id);
140 }
141
142 /// Serialize the index to bytes for checkpoint persistence.
143 pub fn to_bytes(&self) -> Result<Vec<u8>, ColumnarError> {

Callers 2

remove_segmentFunction · 0.45

Calls

no outgoing calls

Tested by 2

remove_segmentFunction · 0.36