Skip to content

Speed up some more logic around resolving shards+indices in searches #111129

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

Conversation

original-brownbear
Copy link
Member

Saving some more indirection and allocations here, mainly to save cycles in extremal cases of searching large shards counts.

@original-brownbear original-brownbear added >non-issue :Search/Search Search-related issues that do not fall into other categories labels Jul 20, 2024
@elasticsearchmachine elasticsearchmachine added Team:Search Meta label for search team v8.16.0 labels Jul 20, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

default:
throw new IllegalArgumentException("unknown preference [" + preferenceType + "]");
}
return switch (preferenceType) {
Copy link
Member Author

@original-brownbear original-brownbear Jul 20, 2024

Choose a reason for hiding this comment

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

This is just cosmetic for the most part but also does save a bit of byte code size.

@javanna javanna added :Search Foundations/Search Catch all for Search Foundations and removed :Search/Search Search-related issues that do not fall into other categories labels Feb 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine elasticsearchmachine added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Feb 14, 2025
@original-brownbear
Copy link
Member Author

Closing this one, the code changed too much since I opened it and with some recent changes the bottlenecks in this logic moved .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants