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

Method dispatch_kv

nodedb/src/data/executor/dispatch/kv.rs:12–34  ·  view source on GitHub ↗
(&mut self, task: &ExecutionTask, tid: u64, op: &KvOp)

Source from the content-addressed store, hash-verified

10
11impl CoreLoop {
12 pub(super) fn dispatch_kv(&mut self, task: &ExecutionTask, tid: u64, op: &KvOp) -> Response {
13 let is_kv_write = matches!(
14 op,
15 KvOp::Put { .. }
16 | KvOp::Insert { .. }
17 | KvOp::InsertIfAbsent { .. }
18 | KvOp::InsertOnConflictUpdate { .. }
19 | KvOp::Delete { .. }
20 | KvOp::BatchPut { .. }
21 | KvOp::Expire { .. }
22 | KvOp::FieldSet { .. }
23 | KvOp::Incr { .. }
24 | KvOp::IncrFloat { .. }
25 | KvOp::Cas { .. }
26 | KvOp::GetSet { .. }
27 | KvOp::Transfer { .. }
28 | KvOp::TransferItem { .. }
29 );
30 if is_kv_write && let Some(r) = self.check_engine_pressure(task, nodedb_mem::EngineId::Kv) {
31 return r;
32 }
33 self.execute_kv(task, tid, op)
34 }
35}

Callers 1

kvMethod · 0.80

Calls 2

check_engine_pressureMethod · 0.80
execute_kvMethod · 0.80

Tested by

no test coverage detected