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

Move some paths in SearchService towards futures and promises #124813

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

original-brownbear
Copy link
Member

Flattening the stack a little for rewriting, we almost never go async on a rewrite so we can save some stack depth, unnecessary listener wrapping (and resulting retention of heap objects!) here and maybe subjectively make the code a little nicer to read.
A nice side-effect of this change is that it makes profiling much easier to interpret as far as the cost of query rewriting is concerned.

This should be relatively trivial to review, there's no expected behavior changes in this because I actively stayed away from removing callback-style code for ref-counted objects/SearchPhaseResult instances.

Flattening the stacks a little here where we close to never go async
and most importantly setting up bigger follow-ups.
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Mar 13, 2025
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 v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants