Skip to content
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

Do not create Weights concurrently in ES|QL lucene operator #109907

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jun 19, 2024

There is currently an optimisation to execute create lucene weights in the worker threads if the weight only applies to one segment. While theoretically that might work it seems to make the code more difficult to reason about because the execution pattern differs from what the classical search is doing and it creates some differences in the benchmarks.

In particular this execution patterns seems to create contention on the LRU cache in some situations. This commit proposes to remove this optimisation to bring search and esql with the same query execution path. We can think later if this optimisation is really worthy and bring it to both code paths. At the moment, it seems this is causing more issues in the nightly benchmarks.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jun 19, 2024
Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @iverase

@iverase iverase merged commit 1f76dee into elastic:main Jun 20, 2024
15 checks passed
@iverase iverase deleted the LuceneSliceQueue branch June 20, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants