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

Allow backgrounding complex kibana search tasks RFC #97825

Closed
ppisljar opened this issue Apr 21, 2021 · 8 comments
Closed

Allow backgrounding complex kibana search tasks RFC #97825

ppisljar opened this issue Apr 21, 2021 · 8 comments
Labels
enhancement New value added to drive a business result Feature:Search Sessions Feature:Search Querying infrastructure in Kibana Icebox impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@ppisljar
Copy link
Member

ppisljar commented Apr 21, 2021

With search sessions its possible to send a set of searches to background and restore them at a later time (when they are complete). This only works for simple searches against elasticsearch and doesn't work for the cases when at the time of storing the session not all searches have started.

This can happen in many places, some of them include:

In order to support that we would need to allow backgrounding complex tasks:

  • the task needs to be able to run on the server. expressions and searchsource are both supported on the server
  • session would need to hold complex task configs (for example the expression and its input)
  • we would need to run the complex tasks on the server at a later point in time on behalf of the user
  • once the complex tasks completes we know we collected all the search ids and we can notify the user about completion

Related:

@ppisljar ppisljar added Feature:Search Querying infrastructure in Kibana Team:AppServices labels Apr 21, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@ppisljar ppisljar changed the title Allow backgrounding complex kibana operations Allow backgrounding complex kibana search tasks Apr 21, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Apr 26, 2021
@petrklapka petrklapka added 1 and removed 1 labels May 6, 2021
@elastic-jb
Copy link

@ppisljar can you help me understand how this manifests itself to users right now? Can you describe a scenario to explain the limitation this would address?

@ppisljar
Copy link
Member Author

searchsource can do multiple subrequests (for histogram, figuring out min and max and for terms other bucket), maps does multiple searchsource requests to get the data, inside an expression you can do any number of requests. none of this can be correctly backgrounded right now and this will allow for backgrounding any of those. (in context of backgrounding search sessions)

@exalate-issue-sync exalate-issue-sync bot added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Jun 6, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Jul 1, 2021
@exalate-issue-sync exalate-issue-sync bot changed the title Allow backgrounding complex kibana search tasks Allow backgrounding complex kibana search tasks RFC Jul 6, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:large Large Level of Effort and removed loe:small Small Level of Effort labels Jul 6, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Aug 19, 2021
@ppisljar
Copy link
Member Author

ppisljar commented Sep 7, 2021

possibly blocked by: #111418

@Dosant
Copy link
Contributor

Dosant commented Jan 14, 2022

@Dosant
Copy link
Contributor

Dosant commented Jan 28, 2022

I think this would also block making SQL search strategy (x-pack/plugins/canvas/server/lib/essql_strategy.ts) to use async search because internally it scrolls through the results:

while (rows.length < count && body.cursor !== undefined) {
response = await esClient.asCurrentUser.sql.query({

Alternatively, maybe elasticsearch could remove a limitation of index.max_result_window on SQL search results when an async search is used?

@petrklapka petrklapka added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. and removed Team:AppServicesSv labels Nov 21, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal
Copy link
Member

kertal commented Oct 30, 2023

Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner.

@kertal kertal closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2023
@kertal kertal added the Icebox label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Search Sessions Feature:Search Querying infrastructure in Kibana Icebox impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

No branches or pull requests

8 participants