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

Method call

nodedb/src/control/cluster/array_cluster_exec.rs:84–96  ·  view source on GitHub ↗
(&self, req: VShardEnvelope, timeout_ms: u64)

Source from the content-addressed store, hash-verified

82#[async_trait]
83impl ShardRpcDispatch for NexarArrayDispatch {
84 async fn call(&self, req: VShardEnvelope, timeout_ms: u64) -> ClusterResult<VShardEnvelope> {
85 match self.call_once(&req, timeout_ms).await {
86 Ok(resp) => Ok(resp),
87 Err(first_err) if is_transport_err(&first_err) => {
88 // Routing table may have pointed at a stale or fake leader.
89 // The metadata applier heals it asynchronously; wait briefly,
90 // re-read routing, and retry once.
91 tokio::time::sleep(std::time::Duration::from_millis(50)).await;
92 self.call_once(&req, timeout_ms).await
93 }
94 Err(e) => Err(e),
95 }
96 }
97}
98
99fn is_transport_err(e: &nodedb_cluster::error::ClusterError) -> bool {

Callers

nothing calls this directly

Calls 2

is_transport_errFunction · 0.85
call_onceMethod · 0.80

Tested by

no test coverage detected