Skip to main content

ArrayLocalExecutor

Trait ArrayLocalExecutor 

Source
pub trait ArrayLocalExecutor:
    Send
    + Sync
    + 'static {
    // Required methods
    fn exec_slice<'life0, 'life1, 'async_trait>(
        &'life0 self,
        req: &'life1 ArrayShardSliceReq,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn exec_surrogate_bitmap_scan<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        array_id_msgpack: &'life1 [u8],
        slice_msgpack: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn exec_agg<'life0, 'life1, 'async_trait>(
        &'life0 self,
        req: &'life1 ArrayShardAggReq,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ArrayAggPartial>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn exec_put<'life0, 'life1, 'async_trait>(
        &'life0 self,
        req: &'life1 ArrayShardPutReq,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn exec_delete<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        array_id_msgpack: &'life1 [u8],
        coords_msgpack: &'life2 [u8],
        wal_lsn: u64,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Execute array operations against the local Data Plane.

The implementor (in nodedb) routes the call through the SPSC bridge to the appropriate TPC core and returns the serialised zerompk result rows or bitmap bytes.

Required Methods§

Source

fn exec_slice<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 ArrayShardSliceReq, ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a coord-range slice and return zerompk-encoded row bytes.

array_id_msgpack — zerompk encoding of nodedb_array::types::ArrayId. slice_msgpack — zerompk encoding of nodedb_array::query::Slice. attr_projection — attribute index list; empty means all attributes. limit — maximum rows to return per shard (0 = unlimited). cell_filter_msgpack — zerompk encoding of SurrogateBitmap; empty means no filter. shard_hilbert_range — optional [lo, hi] Hilbert-prefix range; when set only tiles whose prefix falls in this range are returned, preventing duplicate rows in single-node harnesses where all vShards share one Data Plane. None = no Hilbert filter.

Returns Vec<Vec<u8>> — one element per matching row, each element being the zerompk encoding of that row.

Source

fn exec_surrogate_bitmap_scan<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, array_id_msgpack: &'life1 [u8], slice_msgpack: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a surrogate-bitmap scan and return the zerompk-encoded SurrogateBitmap bytes for matching cells.

array_id_msgpack — zerompk encoding of nodedb_array::types::ArrayId. slice_msgpack — zerompk encoding of nodedb_array::query::Slice.

Source

fn exec_agg<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 ArrayShardAggReq, ) -> Pin<Box<dyn Future<Output = Result<Vec<ArrayAggPartial>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a partial aggregate on this shard and return the partial states.

The Data Plane computes the aggregate with return_partial = true, so it returns Vec<ArrayAggPartial> rather than finalized scalars. The coordinator merges partials from all shards before finalizing.

Source

fn exec_put<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 ArrayShardPutReq, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply a cell-batch write to the local array engine.

req.cells_msgpack is a zerompk encoding of Vec<nodedb::engine::array::wal::ArrayPutCell>. All cells belong to the same Hilbert-prefix tile. The shard handler has already validated that this shard owns the tile; the executor dispatches directly to the Data Plane without further routing checks.

Source

fn exec_delete<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, array_id_msgpack: &'life1 [u8], coords_msgpack: &'life2 [u8], wal_lsn: u64, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete cells by exact coordinates from the local array engine.

array_id_msgpack — zerompk encoding of nodedb_array::types::ArrayId. coords_msgpack — zerompk encoding of Vec<Vec<CoordValue>>. wal_lsn — WAL sequence number allocated by the Control Plane.

Returns the applied_lsn (equal to wal_lsn on success).

Implementors§