Problem
asap-planner-rs's live planner is hardcoded to always emit tumbling
windows. should_use_sliding_window() (planner/window.rs:11-14)
unconditionally returns false
WindowType::Sliding already exists in asap_types::enums and is exercised
by the offline optimizer/cost-model code (optimizer/candidate_gen.rs,
cost_model.rs), but never reachable from the live planner paths that
asap-tools/experiments actually drives.
What this issue covers
Add a manual windowing override to config.yaml, threaded through to the
planner, so an experiment can explicitly choose tumbling vs. sliding windows
(and a slide granularity) instead of always getting tumbling:
windowing:
type: "tumbling" # or "sliding"
slide_divisor: 4 # only meaningful when type == "sliding";
# slide_interval_ms = window_size_ms / slide_divisor
- Global override (not per-query-group) for now — matches
sketch_parameters's existing global-only shape. Per-aggregation-id
control is the ideal case but out of scope here (tracked separately).
- PromQL + SQL paths:
ControllerConfig/SingleQueryProcessor →
set_window_parameters(), and SQLControllerConfig/
SQLSingleQueryProcessor → compute_sql_window(). ElasticDSL excluded —
nothing in asap-tools/experiments generates its controller config today.
slide_divisor must evenly divide each query's computed window_size_ms
(which varies per query — it's derived from that query's own t_repeat_ms
/step_ms, not a global constant) — error loudly, never round.
- Fail-fast: if any one query in the workload can't legally take a
sliding window under the chosen divisor, plan generation aborts entirely
rather than silently punting that query to the raw backend. This is a
deliberate experiment setting, not an automatic optimizer decision — a
silent fallback would quietly corrupt the cost/latency comparison the
experiment exists to make.
Blocked by #554
Shipping this override before sliding-window queries can actually be served
correctly (beyond the narrow single-window-exact-match case) means
windowing.type: sliding would produce plans that fail at query time for
almost any real workload query. See #554 for why, and for the
execution-side work this depends on.
Definition of done
Related
Problem
asap-planner-rs's live planner is hardcoded to always emit tumblingwindows.
should_use_sliding_window()(planner/window.rs:11-14)unconditionally returns
falseWindowType::Slidingalready exists inasap_types::enumsand is exercisedby the offline optimizer/cost-model code (
optimizer/candidate_gen.rs,cost_model.rs), but never reachable from the live planner paths thatasap-tools/experimentsactually drives.What this issue covers
Add a manual
windowingoverride toconfig.yaml, threaded through to theplanner, so an experiment can explicitly choose tumbling vs. sliding windows
(and a slide granularity) instead of always getting tumbling:
sketch_parameters's existing global-only shape. Per-aggregation-idcontrol is the ideal case but out of scope here (tracked separately).
ControllerConfig/SingleQueryProcessor→set_window_parameters(), andSQLControllerConfig/SQLSingleQueryProcessor→compute_sql_window(). ElasticDSL excluded —nothing in
asap-tools/experimentsgenerates its controller config today.slide_divisormust evenly divide each query's computedwindow_size_ms(which varies per query — it's derived from that query's own
t_repeat_ms/
step_ms, not a global constant) — error loudly, never round.sliding window under the chosen divisor, plan generation aborts entirely
rather than silently punting that query to the raw backend. This is a
deliberate experiment setting, not an automatic optimizer decision — a
silent fallback would quietly corrupt the cost/latency comparison the
experiment exists to make.
Blocked by #554
Shipping this override before sliding-window queries can actually be served
correctly (beyond the narrow single-window-exact-match case) means
windowing.type: slidingwould produce plans that fail at query time foralmost any real workload query. See #554 for why, and for the
execution-side work this depends on.
Definition of done
paths.
errors correctly; fail-fast behavior) — these don't depend on Sliding window execution: support multi-window merge/subtract in query engine #554
and can be written now.
correct data" test. That belongs to Sliding window execution: support multi-window merge/subtract in query engine #554, since it's the thing that
proves execution works, not candidate generation — this issue is
scoped to generating the candidates/config, not executing them.
Related
this is the manual stand-in for what feat: Optimization-based sketch/streaming config selection #405 would eventually choose
automatically, not a duplicate of it.
a comment on this issue.