Conversation
This was referenced Sep 30, 2026
Storage computed current-series Sum, Count, Average, Quantile and TopK itself from cached per-group arrays; only TopK was a Planner program over the population snapshot. Populations are now selected over roots typed with the complete series identity, so Planner compiles every ReadPopulation. Storage keeps the population and returns its members; the entry's retained physical program computes the readout. The readout field, the storage readout caches and the cache-builds metric are removed. `without` populations are not selected (Planner cannot yet project them from the series identity); those queries run exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups: a population is selected only if Planner compiles its readout, so a failed compile runs the query exactly instead of failing the deployment. Grouped population outputs must carry exactly the grouping labels. An Int64 count is the sample only when it is the sole numeric column. The summation difference from Prometheus is documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
refactor/query-side-planner-compile
branch
from
September 30, 2026 09:19
0c9b78d to
c1becfb
Compare
zzylol
force-pushed
the
refactor/current-series-planner-readouts
branch
from
September 30, 2026 09:19
bac6b16 to
9dfc40c
Compare
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.
Stacked on #798.
Why
Current-series readouts were still computed in storage.
current_series.rskept per-group caches and computed Sum, Count, Average, Quantile and TopK itself. Only TopK ran as a Planner program over the population snapshot. Planner'sReadPopulationcompile covers all five readouts (coverage rows 22 and 23).What
promql_rows::with_series_identity), socompile_current_series_readoutcompiles every readout. A population is chosen only if its readout compiles.install_population_readout). Storage keeps the population and returns its members.execute_vectorsruns the program.SeriesReadoutand thereadoutfield, the storage readout caches and computation, and theasap_current_series_cache_builds_totalmetric.Before / After
count by (job) (m)CurrentSeries { population, readout: Count }, no physical DAGcurrent_series.rscached group sizesCurrentSeries { population }plus a Planner DAG with output[job, count]Aggregateover the snapshot rowsBehaviour differences
withoutgrouping (for examplequantile without (pod) (0.5, m)) no longer uses a population. Planner cannot yet projectwithoutgroups from the series identity, so these queries run exactly.+Infrather than finite. This is a Planner follow-up.readoutfield no longer deserialize.Remaining
SeriesPopulation.max_kandquantilesno longer affect storage, but they remain in the population sharing key.sum without (pod) (m)andquantile without (pod) (0.5, m)with the workload-cost fixture (SummaryFamilySchemaMismatch). This happens before any backend code runs and is not addressed here.Validation
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked --lib,cargo test -p control_plane --locked --testscargo test -p data_plane --locked --test asapquery_compatibility_process_e2e -- --test-threads=1(26 passed). This includescurrent_series_quantiles_topk_share_and_replace_values, which checks quantile values, TopK and sum/count/avg through the process.[job, count].withoutpopulations are not selected.🤖 Generated with Claude Code