Skip to content

fix: preserve per-series population in ERP execution - #616

Merged
zzylol merged 12 commits into
mainfrom
feat/erp-per-series-execution
Sep 11, 2026
Merged

zzylol merged 12 commits into
mainfrom
feat/erp-per-series-execution

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Why

A Planner-selected per-series KLL materialization was rejected by the backend compiler because an empty grouping list could not distinguish independent series from a global reduction. The runtime also compared semantic slide frequency with stored pane duration during installation.

What

Represent population partitioning explicitly in catalog descriptors and precompute materializations. Preserve full series identity for supported raw per-entity updates, validate the scope against the installed DAG, and use one shared stored-window duration definition during compilation and installation.

How

PopulationPartitioning distinguishes PerEntity from Grouped and contributes to materialization identity. The admission gate remains limited to update forms the producer executes. A real process test measures KLL profiles, passes them through Planner selection, installs the selected plan, ingests two independent series, and verifies warm readout with a health-only fallback server.

Before this PR

quantile_over_time(0.9, erp_latency[5s]) could select a KLL configuration but lose the materialization to whole-query fallback. A physical pane size different from the semantic slide could also reject installation.

After this PR

Two measured profile catalogs cause the real Planner to select K=32 and K=128 respectively. Both configurations produce different materialization identities, install successfully, and execute warm readouts for both labeled series. The evidence is a correctness fixture, not a latency or cost-reduction benchmark.

Verification

  • 69 control-plane tests and 76 shared-types tests passed.
  • Focused producer routing and installed-DAG partition validation tests passed.
  • Real ERP planning/install/ingest/readout process test passed; evidence: /mydata/erp-production-study/process-evidence.json (local artifact, not committed).
  • Full process suite: six cases passed, one existing compatibility matrix case still fails. Its inactive counter series has no state in the later query window; the current counter coverage check falls back rather than distinguishing inactive from pending publication. This remains unresolved and is tracked in the concurrent completeness work.

Limitations

Stacked on #609 and shared executable/precompute contract changes. Finite replay tests use the production drain endpoint to wait for ingestion; this does not establish continuous population completeness. Empirical evidence supplies observed rank error, not a calibrated failure probability. Distributed collector scope and arbitrary summary update forms are not newly admitted.

…xecution

# Conflicts:
#	crates/asap_types/src/aggregation_config.rs
#	crates/asap_types/src/precompute_plan/catalog.rs
#	crates/asap_types/src/sds.rs
#	crates/asap_types/src/summary_catalog.rs
#	data_plane/src/drivers/ingest/prometheus_remote_write.rs
#	data_plane/src/drivers/query/servers/http.rs
#	data_plane/src/precompute_engine/output_sink.rs
#	data_plane/src/storage_engines/sketch_db/lifecycle/eviction.rs
#	data_plane/src/tests/test_utilities/engine_factories.rs
@zzylol
zzylol changed the base branch from feat/erp-production-closure to main September 11, 2026 01:03
@zzylol
zzylol marked this pull request as ready for review September 11, 2026 01:29
@zzylol
zzylol merged commit 0b262c0 into main Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant