elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.98k stars 24.75k forks source link

Move aggregation global ordinals loading from search thread to search worker thread. #98667

Open martijnvg opened 1 year ago

martijnvg commented 1 year ago

Currently global ordinals often if loaded when determine the maximum ordinal in TermsAggregatorFactory#getMaxOrd(...) as part of determining the execution strategy. This happens on a search thread. Before this wasn't an issue because search threads also executed a search, but since recently the search worker is supposed to perform searching and other heavy search related operations and search threads should only coordinate. Loading global ordinals is a heavy operations and should be performed on a search worker thread. This issue is about ensuring that computing global ordinals in aggregation framework to a search worker thread.

elasticsearchmachine commented 1 year ago

Pinging @elastic/es-analytics-geo (Team:Analytics)