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

Function execute

nodedb/src/engine/array/purge/execute.rs:38–47  ·  view source on GitHub ↗

Execute the purge plan against `store`. Returns the total number of tile-version drops across all segment rewrites. The caller is responsible for any tracing / audit records.

(store: &mut ArrayStore, plan: PurgePlan)

Source from the content-addressed store, hash-verified

36/// Returns the total number of tile-version drops across all segment
37/// rewrites. The caller is responsible for any tracing / audit records.
38pub fn execute(store: &mut ArrayStore, plan: PurgePlan) -> Result<u64, ArrayError> {
39 let mut total_dropped: u64 = 0;
40
41 for action in plan.segment_actions {
42 let dropped = rewrite_segment(store, &action)?;
43 total_dropped += dropped;
44 }
45
46 Ok(total_dropped)
47}
48
49/// Intermediate output from the read phase — everything needed to decide
50/// what to write and then perform the manifest swap.

Callers 3

run_purgeFunction · 0.70
execute_graph_matchMethod · 0.50
temporal_purgeMethod · 0.50

Calls 1

rewrite_segmentFunction · 0.85

Tested by

no test coverage detected