feat(engine): migrate cross-reconfigure dispatch to sid-level timeline - #185
Merged
Merged
Conversation
Schema retirement #3. Repoint `ASAPQueryEngine::timeline_for_query` from `SchemaRegistry::timeline_for_metric` to the sid-level `storage_engines::sketch_db::query::timeline::timeline_for_metric` landed in #183. The cross-reconfigure dispatcher (`try_handle_query_promql_via_timeline`) now reads its segments from the sid catalog rather than from `SchemaRegistry`. The sid-level timeline populates `TimelineSegment.agg_id` with a content-hash of `(metric, agg_kind, group_by_keys)` rather than a `StreamingConfig.aggregation_id`. Until schema retirement #5 ports the per-segment dispatch to sid-level evaluation, the segment-→-aggregation_config lookup inside the dispatcher is best-effort: when no segment resolves to an in-config aggregation the dispatcher returns `None` so the caller falls back to the default single-agg path instead of regressing cross-reconfigure queries to empty-result-plus-warnings. The schema retirement plan keeps the `schema_registry` field on `ASAPQueryEngine` alive for now — it's still referenced by the ingest barrier and the swap-handler driver. Both go away in retirements #4 + #5. Two tests in `tests/schema_timeline_dispatch_tests.rs` are marked `#[ignore]`: they build two distinct `AggregationConfig`s with identical content (same metric / Sum / `host` grouping). In the sid catalog those collapse to one signature group → one segment, so the dispatcher can no longer reproduce the schema-boundary-stitch scenario from a SchemaRegistry-shaped fixture. The third single-schema regression test still passes unchanged. Re-enabling these is part of retirement #5 (sid-level dispatch) or a fixture rewrite that uses two genuinely distinct signatures. 787/787 lib tests pass; 5 ignored. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Schema retirement #3 — repoint
ASAPQueryEngine::timeline_for_queryfrom
SchemaRegistry::timeline_for_metricto the sid-levelstorage_engines::sketch_db::query::timeline::timeline_for_metriclanded in #183.
try_handle_query_promql_via_timeline) now reads segments from the sid catalog.Nonewhen no segment's signature-hashagg_idresolves to aStreamingConfigaggregation — cross-reconfigure queries fall through to the default single-agg path instead of regressing to empty-result-with-warnings until retirement feat: vendor DataCollector's modified OTLP proto (PR A, Phase 1) #5 lands sid-level per-segment dispatch.schema_registryfield is kept (still used by the ingest barrier + swap-handler driver). It goes away in retirements docs: design for SimpleMapStore persistence (mem limit + disk flush) #4 + feat: vendor DataCollector's modified OTLP proto (PR A, Phase 1) #5.Test plan
cargo test --lib -p data_plane→ 787 passed; 5 ignored (incl. 2 new#[ignore]s onschema_timeline_dispatch_teststhat build twoAggregationConfigs with identical signatures — those collapse to one sid-level segment so the schema-boundary stitch scenario is no longer reproducible from those fixtures; the single-schema regression test still passes).SchemaRegistry.🤖 Generated with Claude Code