elasticsearch/docs/changelog
Mark Tozzi cf36d97a32
Aggregations cancellation after collection (#120944) (#121936)
This PR addresses issues around aggregations cancellation, mentioned in https://github.com/elastic/elasticsearch/issues/108701 and other places. In brief, during aggregations collection time, we respect cancellation via the mechanisms in the searcher to poison cancelled queries. But once the aggregation finishes collection, there is no further need to interact with the searcher, so we cannot rely on that for cancellation checking. In particular, deeply nested aggregations can spend a long time constructing the results tree.

Checking for cancellation is a trade off, as the check itself is somewhat expensive (it involves a volatile read), so we want to balance checking often enough that cancelled queries aren't taking up resources for a long time, but not so frequently that it slows down most aggregation queries. Our first attempt to this is to check once when we go to build sub-aggregations, as the worst cases for this that we've seen involve needing to build deep sub-aggregation trees. Checking at sub-aggregation construction time also provides a conveniently centralized method call to add the check to.

---------



 Conflicts:
	server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java
	test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-02-07 06:51:21 +11:00
..
117201.yaml ESQL: use field_caps native nested fields filtering (#121918) 2025-02-06 19:39:53 +02:00
119748.yaml Issue S3 web identity token refresh call with sufficient permissions (#119748) (#119929) 2025-01-10 21:48:10 +11:00
120014.yaml Fix potential file leak in ES816BinaryQuantizedVectorsWriter (#120014) (#120091) 2025-01-14 20:00:42 +11:00
120062.yaml [8.16] Update Text Similarity Reranker to Properly Handle Aliases (#120062) (#120077) 2025-01-14 07:03:09 +11:00
120256.yaml [8.16] Improve memory aspects of enrich cache (#120256) (#120762) 2025-01-24 16:18:14 +11:00
120590.yaml Map scope.name as a dimension (#120590) (#120615) 2025-01-23 00:00:12 +11:00
120717.yaml [8.16] LTR - Fix explain failure when index has multiple shards (#120717) (#120794) 2025-01-24 23:21:43 +01:00
120809.yaml LTR sometines throw NullPointerException: Cannot read field "approximation" because "top" is null (#120809) (#120827) 2025-01-25 06:15:42 +11:00
120930.yaml [8.16] backporting fix for negative scores in text_similarity_ranker retriever (#121056) 2025-01-28 18:30:16 +02:00
120944.yaml Aggregations cancellation after collection (#120944) (#121936) 2025-02-07 06:51:21 +11:00
121283.yaml Cheaper snapshot-related toString() impls (#121283) (#121308) 2025-01-31 04:09:56 +11:00
121715.yaml [8.16] Fix synthetic source issue with deeply nested ignored source fields (#121715) (#121790) 2025-02-06 07:13:24 +11:00