-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
auto_date_histogram generates too many buckets for smaller time range #43577
Comments
Pinging @elastic/es-analytics-geo |
/cc @pcsanwald this looks somewhat similar to the failure in #39497, perhaps related? |
Had a quick look, and found the problem area. Or at least, the point where multiple buckets are being generated, don't know enough about auto histo to know where the actual cause is. When you execute the above query (at a time that is a non-multiple of 30 minute), multiple buckets are generated when the coordinator is merging consecutive buckets. At Depending on when the agg executes, sometimes it switches to 5min intervals so the values involved change slightly, but the behavior is basically the same. By pure accident, I executed at a half-hour mark (12:30) and got a single bucket. Once the half-hour mark passed (12:31) it went back to two buckets. I don't know enough about the merging logic to know what's going on, but I think this is probably the area that's broken. |
This does seem quite similar to the failure case and would explain why it's been so tricky to reproduce (I'm currently doing a very long run). |
It seems, that the
auto_date_histogram
seems to generate sometimes too many buckets, especially when using an overall small time-range to filter on. It's not constantly happening (I assume it is related a bit to the exact time you send it), but it happened reliable enough to reproduce it always within max. 1 minute trying.I just used the following request (after injecting the Kibana Flight sample data set):
This request returned the following response:
As you can see even though we specified, we need 1 bucket, it generated 2 buckets for us. When playing around with the overall filter it seems that behavior never triggered for me once I had a timerange larger than 30 minutes, but was able to reproduce it rather often with time ranges below 30 minutes (wasn't linked to exactly 20 minutes time range). I tested this mainly on
master
. I was also not able to reproduce that behavior if I didn't usenow
as the upper bound but tried something likenow-1440m
tonow-1420m
.cc @polyfractal
The text was updated successfully, but these errors were encountered: