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

Method execute_edge_delete

nodedb/src/data/executor/handlers/graph.rs:215–244  ·  view source on GitHub ↗
(
        &mut self,
        task: &ExecutionTask,
        tid: u64,
        collection: &str,
        src_id: &str,
        label: &str,
        dst_id: &str,
    )

Source from the content-addressed store, hash-verified

213 }
214
215 pub(in crate::data::executor) fn execute_edge_delete(
216 &mut self,
217 task: &ExecutionTask,
218 tid: u64,
219 collection: &str,
220 src_id: &str,
221 label: &str,
222 dst_id: &str,
223 ) -> Response {
224 debug!(core = self.core_id, tid, %collection, %src_id, %label, %dst_id, "edge delete");
225 let ord = self.hlc.next_ordinal();
226 use crate::engine::graph::edge_store::EdgeRef;
227 match self.edge_store.soft_delete_edge(
228 EdgeRef::new(TenantId::new(tid), collection, src_id, label, dst_id),
229 ord,
230 ) {
231 Ok(_) => {
232 let partition = self.csr_partition_mut(tid);
233 partition.remove_edge(src_id, label, dst_id);
234 self.checkpoint_coordinator.mark_dirty("sparse", 1);
235 self.response_ok(task)
236 }
237 Err(e) => self.response_error(
238 task,
239 ErrorCode::Internal {
240 detail: e.to_string(),
241 },
242 ),
243 }
244 }
245
246 #[allow(clippy::too_many_arguments)]
247 pub(in crate::data::executor) fn execute_graph_hop(

Callers 2

dispatch_graphMethod · 0.80
execute_tx_sub_planMethod · 0.80

Calls 8

next_ordinalMethod · 0.80
soft_delete_edgeMethod · 0.80
csr_partition_mutMethod · 0.80
mark_dirtyMethod · 0.80
response_okMethod · 0.80
response_errorMethod · 0.80
to_stringMethod · 0.80
remove_edgeMethod · 0.45

Tested by

no test coverage detected