-
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
Rewrite-to-filters optimization is very slow in FiltersAggregator #74480
Comments
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Yikes! I think #74260 is going to have you covered though. It'll switch it back to the old behavior if the top level query isn't empty.
This one is pretty well known at this point. And the place you disabled sort of proves it. So no need for more, I think. I'm going to mark #74260 as closing this one. If you have the ability to test this locally with your data I'd love it if you could. You'd have to restore a snapshot or start with a copy of the data directory or something. Also, if you are so inclined to build a curl or Kibana dev CONSOLE recreation of your issue I'd happily add it as a test to that PR. |
@nik9000 , thank you for the fix! Hopefully everything is good and it will be released soon. |
@nik9000 , is |
Ah, sorry, yeah, I don't have a 7.x branch for that now. I expect I'll have one for it in a few hours though. I can ping you on the PR when I open it if you'd like. |
I tested my app with 7.x branch. It works, thanks! |
Wonderful! Sorry for causing you trouble. Thanks for reporting it! |
For my use-cases, the searches with heavily used Filters aggregations became about 20 times slower comparing version 7.10.2 and 7.13.2. The slowdown happened in version 7.11.0. And it is not just slower, it starts to return errors at high load very soon, where the older version works with 0% errors. Looked very similar to #73426
I took branch 7.13 and changed line 178 in server/src/main/java/org/elasticsearch/search/aggregations/bucket/filter/FiltersAggregator.java from
return parent == null && otherBucketKey == null;
to
return false;
And now it works fast again, even a bit faster than in 7.10.2
Could you do something like #73620 here too, please?
I know, ideally I need to provide a code and a test creating an index with mappings, indexing the data, and running a stress-test. The code change is very similar to #73620, but everything else is quite a lot of work. Please, let me know if you need anything.
Thank you!
The text was updated successfully, but these errors were encountered: