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

Method execute_put

nodedb/src/control/cluster/array_cluster_exec.rs:439–466  ·  view source on GitHub ↗
(
        &self,
        array_id_msgpack: &[u8],
        cells: &[(u64, Vec<u8>)],
        wal_lsn: u64,
        prefix_bits: u8,
    )

Source from the content-addressed store, hash-verified

437 }
438
439 async fn execute_put(
440 &self,
441 array_id_msgpack: &[u8],
442 cells: &[(u64, Vec<u8>)],
443 wal_lsn: u64,
444 prefix_bits: u8,
445 ) -> crate::Result<Vec<u8>> {
446 let params = ArrayWriteCoordParams {
447 source_node: self.source_node,
448 timeout_ms: ARRAY_RPC_TIMEOUT_MS,
449 };
450 coord_put(
451 &params,
452 array_id_msgpack.to_vec(),
453 prefix_bits,
454 wal_lsn,
455 cells,
456 &self.dispatch,
457 &self.circuit_breaker,
458 )
459 .await
460 .map_err(cluster_err)?;
461
462 // Return a simple `{"affected": N}` JSON payload — same shape as the
463 // local ArrayOp::Put response so downstream decode is unchanged.
464 let affected = cells.len() as u64;
465 zerompk::to_msgpack_vec(&affected).map_err(encode_err)
466 }
467
468 async fn execute_delete(
469 &self,

Callers 1

executeMethod · 0.80

Calls 3

coord_putFunction · 0.85
to_vecMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected