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

Cancel query / filter automatically if new query entered or running query is removed #17844

Closed
alexfrancoeur opened this issue Apr 23, 2018 · 4 comments · Fixed by #42035
Closed
Labels
enhancement New value added to drive a business result Feature:Search Querying infrastructure in Kibana

Comments

@alexfrancoeur
Copy link

alexfrancoeur commented Apr 23, 2018

There are a number of users who will accidentally search a wild card against a large dataset from within Kibana. This can sometimes cause the cluster to freeze up while providing the results to that query. It is also possible that end users will pile on more queries on top of the initial request, only making the load on the cluster worse.

Utilizing the new ability to associate an ID with tasks (elastic/elasticsearch#27764) and the task management API, we should be able to automatically cancel a running query if it's modified or removed.

Related to #14544, #17265, #17845, #17846, #24171

@alexfrancoeur
Copy link
Author

Related to:
[Management] List / Terminate Running Tasks #18829
add search ids to requests made to elasticsearch #16493

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure :Discovery labels Sep 16, 2018
@tylersmalley
Copy link
Contributor

tylersmalley commented Sep 26, 2018

I think that canceling the underlying ES query would be preferred, but as a quicker solution, we can prevent the "canceled" query from rendering. This is especially helpful for out of order responses, like when an expensive query (A) is issued, the filter is updated resulting in query (B) - B can return before A, but A will be the last result to render.

@alexfrancoeur
Copy link
Author

@tylersmalley that would be a good addition and make for a better experience. Want to open a separate issue to track?

@AlonaNadler
Copy link

Following EAH discussion on Killbana, currently when users switch context by moving to a different page before the dashboard/discover loads the latest query, the old query still runs in the background in Elasticsearch.
This has a potential to run heavy queries on ES while the users no longer need or expect these queries results, and the results will not show up anywhere in Kibana.

It will be good if we always terminate the previous query in Elasticsearch in cases a new query is running in Kibana to prevent processing un-needed queries in Elasticsearch.
These use case includes:

  • Users moving to a different page while the query is still running
  • Users changing time range while the query still runs
  • Refreshing the page while the query is still running

@nreese mentioned this situation might get worst with GIS as moving within the map will trigger a query, if prior to getting results the user moves the map again, it will trigger another query while the previous query is still running in the background

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 Querying infrastructure in Kibana
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants