fix(query-engine): range query bucket scan steps by slide_interval_ms, not window_size_ms (#600) - #603
Merged
Conversation
…, 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]>
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.
Before
Range-query bucket scanning stepped by
window_size_msfor both value and keys sides. Precompute buckets are always stored on theslide_interval_msgrid. For Tumbling windows the two are equal, so this was invisible — but for a Sliding window withslide_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 towindow_size_msonly when unset/0, matchingWindowManager::new's own normalization). Tumbling behavior is unchanged; Sliding-window range queries now find and merge every real bucket.Test plan
cargo test --workspace— 0 failurescargo clippy --lib --tests— cleancargo fmt --check— cleanFixes #600.