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

Function dispatch_async

nodedb/src/control/server/pgwire/ddl/sync_dispatch.rs:17–33  ·  view source on GitHub ↗

Send `plan` to the Data Plane and await the response. This is async — it yields the Tokio thread while waiting, so the response poller can deliver the result without deadlocking.

(
    state: &SharedState,
    tenant_id: TenantId,
    collection: &str,
    plan: PhysicalPlan,
    timeout: Duration,
)

Source from the content-addressed store, hash-verified

15/// This is async — it yields the Tokio thread while waiting, so the
16/// response poller can deliver the result without deadlocking.
17pub async fn dispatch_async(
18 state: &SharedState,
19 tenant_id: TenantId,
20 collection: &str,
21 plan: PhysicalPlan,
22 timeout: Duration,
23) -> crate::Result<Vec<u8>> {
24 dispatch_async_with_source(
25 state,
26 tenant_id,
27 collection,
28 plan,
29 timeout,
30 crate::event::EventSource::User,
31 )
32 .await
33}
34
35/// Send `plan` to the Data Plane with an explicit event source.
36///

Callers 15

snapshot_selfFunction · 0.85
restore_tenantFunction · 0.85
create_synonym_groupFunction · 0.85
drop_synonym_groupFunction · 0.85
query_last_valuesFunction · 0.85
query_last_valueFunction · 0.85
convert_collectionFunction · 0.85
alter_set_on_conflictFunction · 0.85
show_conflict_policyFunction · 0.85
crdt_stateFunction · 0.85
crdt_applyFunction · 0.85
compact_historyFunction · 0.85

Calls 1

Tested by

no test coverage detected