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

Method dispatch

nodedb/tests/wal_catchup.rs:86–99  ·  view source on GitHub ↗
(&self, plan: PhysicalPlan, collection: &str)

Source from the content-addressed store, hash-verified

84 }
85
86 async fn dispatch(&self, plan: PhysicalPlan, collection: &str) -> serde_json::Value {
87 let resp = nodedb::control::server::dispatch_utils::dispatch_to_data_plane(
88 &self.shared,
89 TenantId::new(1),
90 VShardId::from_collection_in_database(DatabaseId::DEFAULT, collection),
91 plan,
92 TraceId::ZERO,
93 )
94 .await
95 .expect("dispatch failed");
96 let json_str =
97 nodedb::data::executor::response_codec::decode_payload_to_json(&resp.payload);
98 serde_json::from_str(&json_str).unwrap_or(serde_json::Value::Null)
99 }
100
101 async fn query_count(&self, collection: &str) -> u64 {
102 let resp = self

Calls 3

dispatch_to_data_planeFunction · 0.50
decode_payload_to_jsonFunction · 0.50
expectMethod · 0.45

Tested by

no test coverage detected