Skip to content

[9.1] Aggs: Add cancellation checks to FilterByFilter aggregator (#130452) #130736

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

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

ivancea
Copy link
Contributor

@ivancea ivancea commented Jul 7, 2025

Backports the following commits to 9.1:

…30452)

By default, the `FilterByFilterAggregator` (Used by the `"filter"` and `"filters"` aggs) was using the `DefaultBulkScorer` (From Lucene), which has no cancellation mechanism.

This PR wraps it into a `CancellableBulkScorer`, which instead calls the inner scorer with ranges, and checks cancellation between them.

This should solve cases of long-running tasks using these aggregators not being cancelled, or greatly reduce the time they take after cancellation.
@ivancea ivancea added :Analytics/Aggregations Aggregations >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Jul 7, 2025
@elasticsearchmachine elasticsearchmachine merged commit b9b199a into elastic:9.1 Jul 7, 2025
35 checks passed
@ivancea ivancea deleted the backport/9.1/pr-130452 branch July 7, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants