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

Always rewrite search shard request outside of the search thread pool #51708

Merged
merged 12 commits into from
Feb 6, 2020

Commits on Jan 30, 2020

  1. Always rewrite search shard request outside of the search thread pool

    This change ensures that the rewrite of the shard request is executed in the network thread or in the refresh listener
    when waiting for an active shard. This allows queries that rewrite to match_no_docs to bypass the search thread pool
    entirely even if the can_match phase was skipped (pre_filter_shard_size > number of shards). Coordinating nodes
    don't have the ability to create empty responses so this change also ensures that at least one shard creates a full empty
    response while the other can return null ones. This is needed since creating true empty responses on shards require to create
    concrete aggregators which would be too costly to build on a network thread. We should move this functionality to aggregation
    builders in a follow up but that would be a much bigger change.
    This change is also important for elastic#49601 since we want to add the ability to use the result of other shards to rewrite the request
    of subsequent ones. For instance if the first M shards have their top N computed, the top worst document in the global queue can be pass
    to subsequent shards that can then rewrite to match_no_docs if they can guarantee that they don't have any document better than the provided
    one.
    jimczi committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    28fa23b View commit details
    Browse the repository at this point in the history
  2. add serialization test

    jimczi committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    534b552 View commit details
    Browse the repository at this point in the history
  3. iter

    jimczi committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    c02f352 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    010ec08 View commit details
    Browse the repository at this point in the history
  5. fix bwc issue

    jimczi committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    f5684ec View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2020

  1. address review

    jimczi committed Feb 3, 2020
    Configuration menu
    Copy the full SHA
    0acf244 View commit details
    Browse the repository at this point in the history
  2. adapt test

    jimczi committed Feb 3, 2020
    Configuration menu
    Copy the full SHA
    6016fa4 View commit details
    Browse the repository at this point in the history
  3. fix test

    jimczi committed Feb 3, 2020
    Configuration menu
    Copy the full SHA
    a058127 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8534ed2 View commit details
    Browse the repository at this point in the history
  5. add more comments

    jimczi committed Feb 3, 2020
    Configuration menu
    Copy the full SHA
    27cdf19 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a313d1d View commit details
    Browse the repository at this point in the history
  7. more review

    jimczi committed Feb 3, 2020
    Configuration menu
    Copy the full SHA
    662972c View commit details
    Browse the repository at this point in the history