Conversation
Restores the issue 701/702 warm avg_over_time assertions and the finite-division overflow test that #798 rewrote, and adds control-plane acceptance tests. These fail at the current Planner pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up per-series Binary compilation over stored readouts, the without-aggregation state column fix, and Prometheus-compensated sums. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per-series Planner fragments read $promql_series_identity. Fill it from each readout series' labels and decode result labels from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a selected query-time computation does not compile over canonical readouts, select the workload again over roots typed with the series identity. Prefer it when it deploys; otherwise keep it as a candidate forest. The per-series test now checks the snapshot path, and the overflow test finds the checked-division flag anywhere in the fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
refactor/current-series-planner-readouts
branch
from
September 30, 2026 09:19
bac6b16 to
9dfc40c
Compare
zzylol
force-pushed
the
feat/per-series-arithmetic-warm
branch
from
September 30, 2026 09:19
ac9d15a to
56a245d
Compare
Remove the trial compile that made the identity-typed workload the primary request: every forest reaches the same enumeration and pricing, and the trial compiled a request that differed from the deployed one. Reselect only on Planner's missing-identity error, reject a typed forest whose unretyped root shares a state with a retyped root, and record rejections and tagged typed-selection entries in the selection trace. The overflow process test now prices stateful candidates cheapest instead of relying on forest order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Stacked on #799.
Why
#798 forwarded query-side computation that Planner could not compile to the exact engine. Per-series arithmetic over stored readouts, such as
avg_over_time(x[5m])(sum/count),rate(a) / rate(b)andrate(x) * 2, stopped being served from stored state. #798 also rewrote the issue 701/702 tests that asserted a warmavg_over_time, and replaced the finite-division overflow test. Planner PR #489 (integration reve7c64ab) now compiles per-seriesBinarywhen rows carry$promql_series_identity. It also fixes thewithoutaggregation panic (SummaryFamilySchemaMismatch).What
e7c64ab20a18592c462357c9fff954892b0d4a08.Cargo.lockchanges only the six source lines.compile_query_computationwith Planner's missing-identity error (row binary requires grouped rows or rows with a series identity; Planner has no typed variant, so the message is matched), the workload is selected again over roots typed withpromql_rows::with_series_identity. The typed workload is added as one more candidate forest. Deployment pricing chooses among all forests, as it does for the native forests. There is no preferred-request trial compile.sum_over_time(x)next toavg_over_time(x)) keep one semantic definition. A shared state has the same deployed fingerprint typed or untyped (sum_over_time(data[5m]): 17087339741902330309 both ways). A root that cannot be retyped keeps its canonical states, so the typed forest is rejected if such a root shares a state fingerprint with a retyped root.stage: planner.series_identity_reselection): a failed typed selection, a window-preparation failure, no computation that compiles after retyping, or a shared state. Trace entries from the typed selection carry"reselection": "series_identity".native_values::physicalfills$promql_series_identityfrom each readout series' labels. When the output carries the identity, it decodes result labels from that column. This path does not check for duplicate labelsets after__name__is dropped, asexecute_batchesdoes. The Planner fix for duplicate labelsets covers it; this PR does not change it.avg_over_timeassertions andtemporal_average_overflow_falls_back_after_state_is_warmare restored from before refactor: run query-side computation as Planner physical DAGs #798. The overflow test now looks for the checked-division flag anywhere in the fragment, because Planner usesseries_binaryinstead ofVectorBinary. Its quotes now price candidates that read state for every query below the rest, instead of pricing the first feasible candidate cheapest, so the result does not depend on forest order.[avg_over_time(data[5m]), sum by (job)(rate(data[5m]))],[rate(data[5m])*2, sum(rate(data[5m]))],[avg_over_time, sum_over_time]) keep an all-warm candidate;withoutaggregations plan on the workload-cost fixture.__name__, and the result drops it.physical-compiler.md) describes the reselection.Before this PR
avg_over_time(issue701_data[5m])→ExactFallback(row binary requires grouped rows or rows with a series identity). The 701/702 process tests then got a forwarded response instead of a warm one.sum without (pod) (m)planning panicked withSummaryFamilySchemaMismatch.After this PR
avg_over_time(issue701_data[5m])→ one PlannerPhysicalFragment(SeriesLabels×2 + series binary) over the sum and count readouts, answered warm. The overflow workload is warm at value 0. At 1e308 the stored plainSumoverflows, the checked division errors, and the query falls back to the exact answer1e308, as before #798.sum without (pod) (m)andquantile without (pod) (0.5, m)plan without panicking.For
[avg_over_time(data[5m]), sum by (job)(rate(data[5m]))], the request has the canonical workload plus three forests (typed first, then two native). Enumeration gives five candidates, and one serves both queries from four states. Removing the trial compile did not change the enumerated candidate set in the probed workloads, only the order.Validation
SeriesLabels: EOF while parsing).typed_reselection_is_only_a_candidate_forestfails on the pre-review head, where the typed workload replaced the primary request. The other review tests cover behavior that did not regress, or code added in the review.cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked --lib: 1700 passed;cargo test -p control_plane --locked --tests: 459 passed; 0 failedcargo test -p data_plane --locked --test asapquery_compatibility_process_e2e -- --test-threads=1: 26 passed🤖 Generated with Claude Code