Dispatch an ILP batch to the Data Plane with series-aware routing. Groups lines by `(measurement, sorted_tags)` hash to route each series to a deterministic core. This eliminates cross-core contention: each core owns a subset of series. For batches with a single measurement (common case), all lines go to one dispatch — no overhead from grouping.
(
state: &SharedState,
tenant_id: TenantId,
batch: &str,
)
| 71 | /// For batches with a single measurement (common case), all lines go to |
| 72 | /// one dispatch — no overhead from grouping. |
| 73 | pub(super) async fn flush_ilp_batch( |
| 74 | state: &SharedState, |
| 75 | tenant_id: TenantId, |
| 76 | batch: &str, |
| 77 | ) -> crate::Result<u64> { |
| 78 | // Quota enforcement — reject before WAL append or dispatch. |
| 79 | state.check_tenant_quota(tenant_id)?; |
| 80 | state.tenant_request_start(tenant_id); |
| 81 | |
| 82 | let result = flush_ilp_batch_inner(state, tenant_id, batch).await; |
| 83 | state.tenant_request_end(tenant_id); |
| 84 | result |
| 85 | } |
| 86 | |
| 87 | /// Inner dispatch logic for ILP batch (separated for clean quota bookkeeping). |
| 88 | async fn flush_ilp_batch_inner( |
no test coverage detected