Skip to content

fix(query-engine): range query bucket scan steps by slide_interval_ms, not window_size_ms (#600) - #603

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
worktree-600-sliding-scan-window-grid
Aug 25, 2026
Merged

fix(query-engine): range query bucket scan steps by slide_interval_ms, not window_size_ms (#600)#603
milindsrivastava1997 merged 1 commit into
mainfrom
worktree-600-sliding-scan-window-grid

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Contributor

Before

Range-query bucket scanning stepped by window_size_ms for both value and keys sides. Precompute buckets are always stored on the slide_interval_ms grid. For Tumbling windows the two are equal, so this was invisible — but for a Sliding window with slide_interval_ms < window_size_ms, the scan stepped past real bucket timestamps and silently dropped them from the merge (both value-side, pre-existing, and keys-side, introduced by #595).

After

Scan step now reads slide_interval_ms (falling back to window_size_ms only when unset/0, matching WindowManager::new's own normalization). Tumbling behavior is unchanged; Sliding-window range queries now find and merge every real bucket.

Test plan

  • Added RED→GREEN regression tests for both the value side and keys side of the bug
  • cargo test --workspace — 0 failures
  • cargo clippy --lib --tests — clean
  • cargo fmt --check — clean

Fixes #600.

…, not window_size_ms (#600)

finish_range_context derived the range-query bucket-scan step from
window_size_ms for both the value and keys sides, but precompute
buckets are always persisted on the slide_interval_ms grid
(window_manager.rs's panes_for_window). Tumbling windows set the two
equal, masking this; Sliding windows with slide_interval_ms <
window_size_ms had real buckets fall on timestamps the scan never
visited and got silently dropped from the merge.

Fixes #600.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@milindsrivastava1997
milindsrivastava1997 merged commit 5fc64ac into main Aug 25, 2026
8 checks passed
@milindsrivastava1997
milindsrivastava1997 deleted the worktree-600-sliding-scan-window-grid branch August 25, 2026 02:06
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.

Range query scan_window steps by window_size_ms, not slide_interval_ms, for Sliding aggregations

1 participant