Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problems with dates part 1 #832

Merged
merged 6 commits into from
Oct 3, 2024
Merged

Fix problems with dates part 1 #832

merged 6 commits into from
Oct 3, 2024

Conversation

trzysiek
Copy link
Member

@trzysiek trzysiek commented Oct 2, 2024

Query from the test caused Quesma to crash without any error message, as it'd run of out memory in 0,1s or so. You can see it below:
Screenshot 2024-10-02 at 15 33 54
Screenshot 2024-10-02 at 15 34 09
It was a small bug when adding empty rows. Usually keys in date_histogram are x, x+1, x+2,..., when we're using timestamp / duration as a key, so number of added empty rows was kind of limited. But in calendar_interval for big intervals, like 1 week, keys are timestamps in millisecond, so we were adding a new row for each millisecond, exhausting all the memory very quickly.
Fixed here by considering the second option.

@trzysiek trzysiek force-pushed the fix-dates-1 branch 2 times, most recently from 724fb62 to 77f3d3a Compare October 3, 2024 09:54
@trzysiek trzysiek marked this pull request as ready for review October 3, 2024 09:55
@trzysiek trzysiek requested a review from a team as a code owner October 3, 2024 09:55
@trzysiek trzysiek enabled auto-merge October 3, 2024 11:01
@trzysiek trzysiek force-pushed the fix-dates-1 branch 5 times, most recently from 83eb19b to 2b367d9 Compare October 3, 2024 11:22
@jakozaur
Copy link
Contributor

jakozaur commented Oct 3, 2024

@trzysiek perhaps we should add safeguard to not add more than X missing timeslots (like 1000). It looks like we still may hit this issue.

@trzysiek trzysiek force-pushed the fix-dates-1 branch 5 times, most recently from 50f1e50 to 6e51ea0 Compare October 3, 2024 12:04
@trzysiek trzysiek added this pull request to the merge queue Oct 3, 2024
Merged via the queue into main with commit b91f7b3 Oct 3, 2024
5 checks passed
@trzysiek trzysiek deleted the fix-dates-1 branch October 3, 2024 15:05
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.

2 participants