fix(issue-timeseries): Unfilled buckets when ts aren't aligned#103771
Merged
fix(issue-timeseries): Unfilled buckets when ts aren't aligned#103771
Conversation
Member
wmak
commented
Nov 20, 2025
- When the start and end of the query wasn't aligned the page would error since the bucket check wouldn't match since ms were being included. This removes ms from the start/end during this check to resolve the issue
- When the start and end of the query wasn't aligned the page would error since the bucket check wouldn't match since ms were being included. This removes ms from the start/end during this check to resolve the issue
gggritso
approved these changes
Nov 20, 2025
| ) -> list[Row]: | ||
| # remove microseconds | ||
| start = start.replace(microsecond=0) | ||
| end = end.replace(microsecond=0) |
Contributor
There was a problem hiding this comment.
Bug: Database and generated timestamps misaligned when start has microseconds
The fix removes microseconds from the local start and end variables in fill_timeseries, which affects the generated bucket timestamps. However, the database query still uses the original start (with microseconds) as the origin for date_bin, causing the database-returned timestamps to be offset by the microsecond amount. This prevents the bucket matching logic from working correctly since the comparison ts == values[index]["timestamp"] will fail due to the timestamp offset, ultimately causing an UnconsumedBuckets exception when not all buckets match.
jerryzhou196
pushed a commit
that referenced
this pull request
Dec 1, 2025
- When the start and end of the query wasn't aligned the page would error since the bucket check wouldn't match since ms were being included. This removes ms from the start/end during this check to resolve the issue
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.