Repository navigation
Description
Found during the single-node MVP smoke test (/mydata/mvp-smoke-test/REPORT.md on the dev box). Sister to ASAPCollector#381 (agent OpAMP-push doesn't reload) — this is what makes Axis C (end-to-end PromQL) return empty even though Axis D shows 8800 sids registered.
Correction to an earlier version of this issue: the original write-up framed this as an "agg_id hash mismatch" between two
xxh64schemes. That's wrong —compute_sketch_sidwas retired in PR #190/#192 andsidis now a counter (perdocs/design-sid-lifecycle.md). The actual root cause is sid identity mismatch: the agent emits sketches with all wire attrs, so the backend mints sids over the full attr set, but the streaming-config (and the still-extantaggregation_idquery path) expects sids grouped down togrouping_labelsonly.
What's stored
SeriesIdResolver mints sid = fetch_add(1) keyed by (metric_name, attrs_fingerprint, agg_kind_canonical). The fake-exporter emits http_requests_total_latency_ms with {zone, rack, node, pod, endpoint, service.name, telemetry.sdk.name, telemetry.sdk.language, telemetry.sdk.version} (9 keys); the agent's DDSketch processor doesn't drop or roll up any of them. So the backend mints 51 sids for http_requests_total_latency_ms — one per unique full-attr tuple — each carrying group_by_keys = [endpoint, node, pod, rack, service.name, telemetry.sdk.*, zone].
What the query path looks for
asap_query_engine/engine.rs:1743 logs:
Query execution failed: No precomputed outputs found for metric: http_requests_total_latency_ms,
aggregation_id: 16882953407686652000
16882953407686652000 is PolicyFingerprint::as_u64() of the streaming-config entry — xxh64(metric + agg_type + sub_type + params + grouping_labels=[zone] + aggregated_labels=[]). The store has no rows keyed by that agg_id because nothing on the ingest path computed a PolicyFingerprint with grouping_labels=[zone] (the agent never group-reduced before sketching).
Reproduction
bash /mydata/mvp-smoke-test/run_smoke.shAfter 90 s:
curl http://localhost:19091/api/v1/streaming-config→aggregation_id: 16882953407686652000registeredcurl http://localhost:19091/api/v1/db/schemas→ 51 sids for the metric, each with full-attrgroup_by_keyscurl 'http://localhost:19091/api/v1/db/timeline?metric=http_requests_total_latency_ms&start_ms=...&end_ms=...'→ 1 segment underagg_id: 6206425945726099596— note this is the timeline endpoint's content-derived signature id (xxh64 of metric + agg_kind + group_by_keysper the comment inhandle_get_timeline), not the PolicyFingerprint the query path looks up. Two different hash schemes, both surfaced asagg_idin the API output — confusing but real.curl --data-urlencode 'query=quantile_over_time(0.99, http_requests_total_latency_ms[30s])' http://localhost:19091/api/v1/query→{"error":"No result for query"}
Fix paths
This sits at the intersection of two in-progress migrations:
- Schema-retirement feat: vendor DataCollector's modified OTLP proto (PR A, Phase 1) #5 in
engine.rs:2392— finish removing theaggregation_idlookup from the query plan and route queries directly through the sid catalog ((metric, agg_kind, attrs_subset)→ sids that subsume the asked grouping). When this lands the agg_id path goes away entirely, and the question becomes "find sids whosegroup_by_keysare a superset of the query's grouping, then merge by the asked subset." - Agent-side group-reduction — when ASAPCollector#381 lands and the controller's typed-stage-split YAML actually reaches the agent, the per-metric pipeline needs an
attributes/keep(or equivalent) processor upstream of each sketch processor that whitelistsgrouping_labels. Then the agent emits sketches with attrs already reduced to[zone], the resolver mints the desired N-zone sids, and any query that asks for the streaming-config's grouping finds them directly.
Either fix unblocks Axis C. Both might land independently — (1) is purely backend, (2) needs ASAPCollector#381 first.
Tagged bug, mvp-demo, query-engine, schema-retirement-5.
Activity
[-]MVP demo: query agg_id mismatch — agent emits full-attr hash, streaming-config has grouping-only hash[/-][+]MVP demo: agent emits full-attr sketches → no sid match for grouped streaming-config[/+]zzylol commentedon May 17, 2026
Schema-retirement #5 (one of the two fix paths called out in this issue) is now tracked in #272.
fix(query): union instances_matching into ASAP-tier sid resolution (s…
zzylol commentedon May 17, 2026
Fix path 2 (backend-side: union
instances_matchinginto the modern execute() sid resolution) landed in #273. End-to-end smoke test Axis C now returns a real DDSketch quantile:NB: smoke test must use
[5m](or any range \≥ the agent's 60s window_duration);[30s]returns NoData because the range can land entirely inside an open sketch window. Separately, thesum by (zone) (http_requests_total)query still fails — the agent emits DDSketch but the query needs Sum capability, which is fix path 1 territory (controller pushes appropriate sketch type or agent emits ExactAgg precompute). Closing this issue would be premature until fix path 1 is also resolved or scope-narrowed.The remaining agg_id retirement work (legacy
handle_querypath, ingest bucketing, precompute worker, backfill) is tracked in #272.fix(query): port resolve_sketch_metric_alias to modern execute() (sch…
revert+retire(query): delete dead resolve_sketch_metric_alias rewrite (…
zzylol commentedon May 18, 2026
Status update 2026-05-17 — fix path 2 (controller-side) now lands in stages:
B3 (agent emits sketches grouped by
[zone])attributes/keepupstream of each sketch processor (only whengrouping_labelsis set)metric_to_grouping_labelsfrom WorkloadEntry so the routing-table builder has data to threadgrouping_labels: [zone]to all 8 entries indeploy/mvp-singlenode/configs/mvp-workload.yamlEnd-to-end verification post-#390:
Still failing —
sum by (zone) (http_requests_total): DDSketch can't answer Sum capability. Tracked as B2 (Sum-as-separate-aggregation). The fix in flight restructuresWorkloadStorefromHashMap<metric, QueryWorkload>toHashMap<(metric, AggRole), QueryWorkload>so the same metric can carry both a quantile AggregationConfig (DDSketch) and a sum AggregationConfig (ExactAgg) simultaneously.Closing this issue when B2 lands and Sum-capability returns end-to-end.
zzylol commentedon May 18, 2026
Closing as fixed — the wave is end-to-end green on both single-node smoke harness and 4-node multinode deploy.
Path 1 (controller-side, originally tracked here):
Path 2 (backend-side, the original "fix path 2"): #273 — landed early in the wave
Last-mile data_plane work:
sum by (...)to ExactAgg(Sum) sidstopk(K, sum by (...) (rate(...))))Multinode harness gap (separate but related): ASAPCollector #394 — added controller container to mvp-multinode runner + fixed replay typo + extended queries-e2e.json with wave queries + cleaned stale
bucket:yaml key.Smoke verification (singlenode):
Multinode verification (4-node, against node2:9091):
sum by (zone) (http_requests_total)→ z0..z3 ~981M eachsum by (zone) (rate(http_requests_total[5m]))→ z0..z3 ~4.8Mtopk(5, sum by (zone) (rate(...)))→ ranked 4 zonesdata_source: asap_query