You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Search: a query-time scan's lower bound takes the shortest possible reader window, so the cheaper plan is never proposed (#987) #994
Prices did not change: #987 touches only lower_bounds.rs and the search's rounding tolerance. The search now selects a plan that costs 39% more.
Main's CI did not catch this. CI stopped at the stale planner_fuzz#902 test first, which #992 fixes.
Current behavior
The full search rounds never validate a plan on this workload, before or after #987, even with a 120 s limit. So the seed round decides the result (5 s, 32 evaluations, route.rs:115).
shortest_reader_windows (lower_bounds.rs:282) bounds a query-time scan by the shortest window of any reader that might read it.
The widened 5 m scan can also be read by the instant selectors, so it is bounded at their 15 s lookback: 0.0074, 20× below its real 0.148.
The two-scan plan has a higher bound. Proposals go in bound order, so it is never proposed within the budget.
Expected behavior and invariant
The bound stays sound but depends on the readers actually selected, so the cheaper plan is proposed and the test's 0.1518 holds. One option is a MILP constraint cost_s ≥ price(rows(w_r)) · x(r reads s) for each reader connection, instead of a fixed bound at the shortest possible window. This stays sound because the evaluator reads the longest selected window.
Regression test
The existing test, scans_projecting_different_labels_are_shared.
Activity