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

Method execute_compact

nodedb/src/data/executor/handlers/compact/runner.rs:26–36  ·  view source on GitHub ↗

Execute an on-demand compaction request. Forces compaction of all vector collections (regardless of tombstone ratio), CSR compaction, and dangling edge sweep. Returns a summary payload with compaction statistics.

(&mut self, task: &ExecutionTask)

Source from the content-addressed store, hash-verified

24 /// ratio), CSR compaction, and dangling edge sweep. Returns a summary
25 /// payload with compaction statistics.
26 pub(in crate::data::executor) fn execute_compact(&mut self, task: &ExecutionTask) -> Response {
27 let result = self.run_compaction(true);
28 let payload = match zerompk::to_msgpack_vec(&result) {
29 Ok(p) => p,
30 Err(e) => {
31 tracing::warn!(error = %e, "failed to encode compaction stats");
32 Vec::new()
33 }
34 };
35 self.response_with_payload(task, payload)
36 }
37
38 /// Run all maintenance/compaction tasks.
39 ///

Callers 1

dispatch_metaMethod · 0.80

Calls 2

run_compactionMethod · 0.80
response_with_payloadMethod · 0.80

Tested by

no test coverage detected