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

Method compact_all

nodedb-graph/src/sharded.rs:143–148  ·  view source on GitHub ↗

Compact every partition. Mirrors `CsrIndex::compact` but across the full set — maintenance handlers call this once per core. # Errors Returns the first [`GraphError::MemoryBudget`] encountered if any partition has a memory governor installed and the budget is exhausted. Partitions already compacted before the error are not rolled back.

(&mut self)

Source from the content-addressed store, hash-verified

141 /// partition has a memory governor installed and the budget is exhausted.
142 /// Partitions already compacted before the error are not rolled back.
143 pub fn compact_all(&mut self) -> Result<(), GraphError> {
144 for (_tid, part) in self.iter_mut() {
145 part.compact()?;
146 }
147 Ok(())
148 }
149
150 /// Replace an existing partition (or install a new one) with the
151 /// given `CsrIndex`. Used by the rebuild path — after rebuilding a

Callers 5

execute_checkpointMethod · 0.80
rebuild_index_inlineMethod · 0.80
run_compactionMethod · 0.80

Calls 2

iter_mutMethod · 0.80
compactMethod · 0.45

Tested by 1