-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add _top/searches
API
#12187
Comments
It's a fine proposal I'd love to try my hand at! Unless someone else wants
|
This sounds very much like MongoDB's db.currentOp() and db.killOp(), both of which are immensely useful in the MongoDB world. Can't wait to see this functionality in Elasticsearch as well. |
From a HTTP verb perspective, does it make sense to use DELETE rather than POST to kill the query? |
Can we expect this feature for the coming elasticsearch-2.0 version ? |
It looks like the task management API will fulfill this need. Closing in favour of #15117 |
It might be useful to keep this around as an explicit use case for task management. It may be we get all these "for free" using stuff built into task management but it'd be nice to talk about this feature explicitly in docs, maybe have tests for it, etc. |
Reopening based on @nik9000's comment. |
+1 This is a fairly common request so it will be nice to track it separately, or close it once we have confirmed that it has been released with the task management api. thx! |
Being able to list running queries would be helpful; being able to kill bad ones if needed would be really helpful.
The key thing that stands out to me about this statement is that it has to do with logging queries at the cluster level. The slow query log doesn't do this. Without a view of queries being sent to the cluster, it's impossible to do any kind of reasoning about where you can get the most bang for your buck helping devs rewrite their queries and/or revising schemas to support the queries they need to run. If the IMO, adding a |
This feature is being implemented as part of the task management API here #20405
Agreed - this will be tackled separately. Closing in favour of #20405 |
Admins faced with busy nodes have no way of knowing what bad queries users are sending to their cluster. The
_top/searches
API should provide a list of all currently executing queries, how long they have been executing, and the ability to kill a query (where possible).This could be implemented as follows:
GET _top/search
request will reach out to all nodes to retrieve currently running requests, their elapsed execution time, and which nodes they are running onPOST _top/search/_kill/[searchid]
will cause the coordinating node to update the timeout for the request to 0, killing the request as soon as possible (if possible)NOTE: a script like
while (1) {...}
is not killable without restarting affected nodes. We can't use thread interrupts because they are buggy.Inspired by #4329
The text was updated successfully, but these errors were encountered: