(
&mut self,
task: &ExecutionTask,
op: &ArrayOp,
)
| 18 | |
| 19 | impl 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 { |
no test coverage detected