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

Function handle_delete

nodedb-cluster/src/distributed_array/handler.rs:130–150  ·  view source on GitHub ↗
(
    local_vshard_id: u32,
    payload: &[u8],
    executor: &Arc<dyn ArrayLocalExecutor>,
)

Source from the content-addressed store, hash-verified

128}
129
130async fn handle_delete(
131 local_vshard_id: u32,
132 payload: &[u8],
133 executor: &Arc<dyn ArrayLocalExecutor>,
134) -> Result<Vec<u8>> {
135 let req: ArrayShardDeleteReq =
136 zerompk::from_msgpack(payload).map_err(|e| ClusterError::Codec {
137 detail: format!("ArrayShardDeleteReq decode: {e}"),
138 })?;
139
140 validate_delete_routing(&req, local_vshard_id)?;
141
142 let applied_lsn = executor
143 .exec_delete(&req.array_id_msgpack, &req.coords_msgpack, req.wal_lsn)
144 .await?;
145 let resp = ArrayShardDeleteResp {
146 shard_id: local_vshard_id,
147 applied_lsn,
148 };
149 serialise(resp)
150}
151
152async fn handle_surrogate_bitmap(
153 local_vshard_id: u32,

Callers 1

handle_array_shard_rpcFunction · 0.85

Calls 3

validate_delete_routingFunction · 0.85
serialiseFunction · 0.85
exec_deleteMethod · 0.45

Tested by

no test coverage detected