Skip to content

[8.x] Avoid walking the complete list of search contexts on shard creation (#123855) #126798

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

Conversation

original-brownbear
Copy link
Member

Backports the following commits to 8.x:

…lastic#123855)

This I found in the many-shards benchmark during some manual testing.
Creating indices slows down measurably when there's concurrent searches
going on. Interestingly enough, the bulk of the cost is coming from this
hook. This makes sense to some extend because the map can quickly grow
to a massive size as it scales as O(shards_searched_on_average *
concurrent_searches) and a CHM generally is anything but cheap to
iterate over.
@original-brownbear original-brownbear added :Search Foundations/Search Catch all for Search Foundations >non-issue auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Apr 14, 2025
@elasticsearchmachine elasticsearchmachine merged commit 74bdf18 into elastic:8.x Apr 14, 2025
15 checks passed
@original-brownbear original-brownbear deleted the backport/8.x/pr-123855 branch April 14, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >non-issue :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants