Build a `Request` for a committed write with default deadline / priority.
(
state: &Arc<SharedState>,
tenant_id: TenantId,
vshard_id: VShardId,
plan: PhysicalPlan,
event_source: crate::event::EventSource,
)
| 30 | |
| 31 | /// Build a `Request` for a committed write with default deadline / priority. |
| 32 | fn build_request( |
| 33 | state: &Arc<SharedState>, |
| 34 | tenant_id: TenantId, |
| 35 | vshard_id: VShardId, |
| 36 | plan: PhysicalPlan, |
| 37 | event_source: crate::event::EventSource, |
| 38 | ) -> Request { |
| 39 | Request { |
| 40 | request_id: state.next_request_id(), |
| 41 | tenant_id, |
| 42 | database_id: DatabaseId::DEFAULT, |
| 43 | vshard_id, |
| 44 | plan, |
| 45 | deadline: Instant::now() + Duration::from_secs(30), |
| 46 | priority: Priority::Normal, |
| 47 | trace_id: TraceId::generate(), |
| 48 | consistency: ReadConsistency::Strong, |
| 49 | idempotency_key: None, |
| 50 | event_source, |
| 51 | user_roles: Vec::new(), |
| 52 | user_id: None, |
| 53 | statement_digest: None, |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /// Dispatch a request through the SPSC bridge and await its response. |
| 58 | /// |
no test coverage detected