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

Method dispatch_array

nodedb/src/data/executor/dispatch/array/entry.rs:20–124  ·  view source on GitHub ↗
(
        &mut self,
        task: &ExecutionTask,
        op: &ArrayOp,
    )

Source from the content-addressed store, hash-verified

18
19impl CoreLoop {
20 pub(in crate::data::executor) fn dispatch_array(
21 &mut self,
22 task: &ExecutionTask,
23 op: &ArrayOp,
24 ) -> Response {
25 // Pressure guard for write operations.
26 let is_write = matches!(op, ArrayOp::Put { .. } | ArrayOp::Delete { .. });
27 if is_write && let Some(r) = self.check_engine_pressure(task, nodedb_mem::EngineId::Array) {
28 return r;
29 }
30 match op {
31 ArrayOp::OpenArray {
32 array_id,
33 schema_msgpack,
34 schema_hash,
35 prefix_bits,
36 } => self.handle_array_open(task, array_id, schema_msgpack, *schema_hash, *prefix_bits),
37 ArrayOp::Put {
38 array_id,
39 cells_msgpack,
40 wal_lsn,
41 } => self.handle_array_put(task, array_id, cells_msgpack, *wal_lsn),
42 ArrayOp::Delete {
43 array_id,
44 coords_msgpack,
45 wal_lsn,
46 } => self.handle_array_delete(task, array_id, coords_msgpack, *wal_lsn),
47 ArrayOp::Flush { array_id, wal_lsn } => {
48 self.handle_array_flush(task, array_id, *wal_lsn)
49 }
50 ArrayOp::Compact {
51 array_id,
52 audit_retain_ms,
53 } => self.handle_array_compact(task, array_id, *audit_retain_ms),
54 ArrayOp::DropArray { array_id } => self.handle_array_drop(task, array_id),
55 ArrayOp::Slice {
56 array_id,
57 slice_msgpack,
58 attr_projection,
59 limit,
60 cell_filter,
61 hilbert_range,
62 system_as_of,
63 valid_at_ms,
64 } => self.dispatch_array_slice(
65 task,
66 SliceParams {
67 array_id,
68 slice_msgpack,
69 attr_projection,
70 limit: *limit,
71 cell_filter: cell_filter.as_ref(),
72 hilbert_range: *hilbert_range,
73 system_as_of: *system_as_of,
74 valid_at_ms: *valid_at_ms,
75 },
76 ),
77 ArrayOp::SurrogateBitmapScan {

Callers 1

arrayMethod · 0.80

Calls 13

check_engine_pressureMethod · 0.80
handle_array_openMethod · 0.80
handle_array_putMethod · 0.80
handle_array_deleteMethod · 0.80
handle_array_flushMethod · 0.80
handle_array_compactMethod · 0.80
handle_array_dropMethod · 0.80
dispatch_array_sliceMethod · 0.80

Tested by

no test coverage detected