-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Search service] Add async search strategy #53057
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
💔 Build FailedHistory
To update your PR or re-run it, just comment with: |
we're past 7.6.0 FF, can you please bump label to v7.7.0 |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
One thing I would improve is to have the ID of the polled async request in the URL (rather than as a POST argument) to make it more easily debuggable.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Add async search strategy * Add async search * Fix async strategy and add tests * Move types to separate file * Revert changes to demo search * Update demo search strategy to use async * Add cancellation to search strategies * Add tests * Simplify async search strategy * Move loadingCount to search strategy * Update abort controller library * Bootstrap * Abort when the request is aborted * Add utility and update value suggestions route * Fix bad merge conflict * Update tests * Move to data_enhanced plugin * Remove bad merge * Revert switching abort controller libraries * Revert package.json in lib * Move to previous abort controller * Fix test to use fake timers to run debounced handlers * Revert changes to example plugin * Fix loading bar not going away when cancelling * Call getSearchStrategy instead of passing directly * Add async demo search strategy * Fix error with setting state * Update how aborting works * Fix type checks * Add test for loading count * Attempt to fix broken example test * Revert changes to test * Fix test * Update name to camelCase * Fix failing test * Don't require data_enhanced in example plugin Co-authored-by: Elastic Machine <[email protected]>
7.x (7.7.0): b0336a7 |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Resolves #48811.
This PR adds a new abstract asynchronous search strategy (as opposed to the existing synchronous search strategy). It sends the first request as given (with all request parameters), and expects to receive an
id
in the response, which it then uses to poll the same backend endpoint until the response indicates that it is complete by sending aloaded
property that is equal to thetotal
property.The location of this new search strategy is inside a new enhanced data plugin (
data_enhanced
) which is meant to contain the basic & commercial features related to the OSS data plugin (data
).At the moment, no existing search strategies are using this, but when the asynchronous search APIs land in Elasticsearch, we will override the existing
ES_SEARCH_STRATEGY
to use this async strategy to make the initial request and then poll.This PR also removes the
percentComplete
optional property inIKibanaSearchResponse
, as it can easily be derived fromtotal / loaded
in the response (if provided).Remaining to do
signal
is abortedChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers