Tracking issue for the final step of the agg_id retirement migration. Steps #1-#4 already landed (sid-level eviction, sid-level reconcile from streaming-config, sid-level §6.3 ingest barrier, big-bang SchemaRegistry deletion — see PRs #183-#187 + #189). Step #5 is the remaining surface: the query path still resolves precomputed outputs via StreamingConfig.aggregation_id, and ingest still buckets per-(aggregation_id, group_key) even though storage downstream is sid-keyed.
This is the issue that #271 (MVP demo: agent emits full-attr sketches → no sid match) calls out as one of two fix paths for Axis C of the MVP smoke test.
Concrete sites still holding agg_id
data_plane/src/query_engines/asap_query_engine/engine.rs
:2392 "Until schema-retirement #5 ports the per-segment dispatch
to sid-level evaluation directly …"
:945, :990, :969, :1042, :1127, :2066, :2099, :2197, :2305
full per-segment dispatch + error paths still keyed on agg_id
data_plane/src/drivers/ingest/otel.rs
:561 by_group.entry((config.aggregation_id(), group_key))
:640 WorkerMessage::AccumulatorInput { agg_id: config.aggregation_id(), … }
:1203 // DEPRECATED: aggregation_id-keyed write — remove
:520, :723 "Schema retirement #5 — agg_id-keyed `SchemaRegistry` is gone"
(already done; reference comments)
data_plane/src/precompute_engine/output_sink.rs
:206, :232 output sink still tags writes with cfg.aggregation_id()
data_plane/src/storage_engines/sketch_db/backfill/processor.rs
:343, :350, :418, :440, :596, :646 backfill processor maps still keyed on agg_id
data_plane/src/storage_engines/types/precomputed_output.rs
:40, :162 `// with aggregation_id kept for legacy compat; PR 5 retired …`
data_plane/src/main.rs
:491, :562, :739, :784 `// Schema retirement #5 — …` reference comments
What "done" looks like
- Query path's
build_query_execution_context_promql_for_agg_id (engine.rs:2197) folded into a sid-keyed equivalent that takes (metric, agg_kind, attrs_subset) and finds candidate sids whose group_by_keys ⊇ attrs_subset, then merges across them.
- Ingest bucketing in
otel.rs:561 rekeyed from (aggregation_id, group_key) → (sid, …) or (metric, agg_kind, group_key) → sids.
output_sink.rs and backfill/processor.rs rekeyed from agg_id → sid.
PolicyFingerprint::as_u64() survives as the streaming-config identity for the OUTSIDE world (controller → backend POST, persistence), but the internal config.aggregation_id() accessor disappears from hot paths.
- Re-enable the two ignored cross-reconfigure dispatch tests in
tests/schema_timeline_dispatch_tests.rs (gated by sid-level per-segment dispatch — fixture needs reworking too because the two test configs collapse to one sid under content-addressing; see asapquery-backend-phase5-m2-3-progress notes).
- Delete
pub fn aggregation_id() on AggregationConfig (or downgrade to test-only) once all consumers are gone.
Why this unblocks the MVP demo
With schema-retirement #5 done, the query path resolves directly from the metric name + asked grouping to a set of sids in the catalog — no PolicyFingerprint detour. The full-attr sketches the agent currently emits (because of ASAPCollector#381 — agent doesn't apply OpAMP runtime config) become queryable: their group_by_keys is a superset of [zone], so a sum by (zone) query merges across them at execution time.
(Until #5 lands, the alternate unblock is to have the agent group-reduce upstream of the sketch — needs ASAPCollector#381 first.)
Done already (don't redo)
See asapquery-backend-phase5-m2-3-progress memory + the post-M2.3 sketch_db reorg notes for the broader context.
Tagged mvp-demo, query-engine, schema-retirement-5.
Tracking issue for the final step of the agg_id retirement migration. Steps #1-#4 already landed (sid-level eviction, sid-level reconcile from streaming-config, sid-level §6.3 ingest barrier, big-bang
SchemaRegistrydeletion — see PRs #183-#187 + #189). Step #5 is the remaining surface: the query path still resolves precomputed outputs viaStreamingConfig.aggregation_id, and ingest still buckets per-(aggregation_id, group_key)even though storage downstream is sid-keyed.This is the issue that #271 (MVP demo: agent emits full-attr sketches → no sid match) calls out as one of two fix paths for Axis C of the MVP smoke test.
Concrete sites still holding agg_id
What "done" looks like
build_query_execution_context_promql_for_agg_id(engine.rs:2197) folded into a sid-keyed equivalent that takes(metric, agg_kind, attrs_subset)and finds candidate sids whosegroup_by_keys ⊇ attrs_subset, then merges across them.otel.rs:561rekeyed from(aggregation_id, group_key)→(sid, …)or(metric, agg_kind, group_key) → sids.output_sink.rsandbackfill/processor.rsrekeyed from agg_id → sid.PolicyFingerprint::as_u64()survives as the streaming-config identity for the OUTSIDE world (controller → backend POST, persistence), but the internalconfig.aggregation_id()accessor disappears from hot paths.tests/schema_timeline_dispatch_tests.rs(gated by sid-level per-segment dispatch — fixture needs reworking too because the two test configs collapse to one sid under content-addressing; seeasapquery-backend-phase5-m2-3-progressnotes).pub fn aggregation_id()onAggregationConfig(or downgrade to test-only) once all consumers are gone.Why this unblocks the MVP demo
With schema-retirement #5 done, the query path resolves directly from the metric name + asked grouping to a set of sids in the catalog — no PolicyFingerprint detour. The full-attr sketches the agent currently emits (because of ASAPCollector#381 — agent doesn't apply OpAMP runtime config) become queryable: their
group_by_keysis a superset of[zone], so asum by (zone)query merges across them at execution time.(Until #5 lands, the alternate unblock is to have the agent group-reduce upstream of the sketch — needs ASAPCollector#381 first.)
Done already (don't redo)
SchemaRegistrydeleted (PR feat(sketch_db): retire schema/ module — sid-only lifecycle #189)/api/v1/db/schemas?:agg_idendpoints rewired to:sidSee
asapquery-backend-phase5-m2-3-progressmemory + the post-M2.3 sketch_db reorg notes for the broader context.Tagged
mvp-demo,query-engine,schema-retirement-5.