Sql query cannot be cancelled and long running

I am unable to cancel the Elasticsearch sql query which is long running and I would like to know whether there is any option to make 'cancellable' true in the sql API.

{
"completed": false,
"task": {
"node": "5yiolpwu7l-nMcu3UoeUUg",
"id": 739961139,
"type": "transport",
"action": "indices:data/read/sql",
"description": "SQL [SELECT "product" AS "column1", "cursor" AS "column2" FROM "product_data" AS "cb3f008d95474444354567866"\r \r WHERE ( ( ("date" >= '2021-12-02' AND "date" <= '2022-02-28')) AND ( (CAST("product" AS VARCHAR) IN( 'India', 'India', 'India', 'India', 'China' ))))\r GROUP BY "skills", "cursor"\r ORDER BY COUNT( DISTINCT "cursor" ) DESC, "column1" ASC, "column2" ASC LIMIT 1 ][null]",
"start_time_in_millis": 1645698398116,
"running_time_in_nanos": 496370826338275,
"cancellable": false,
"headers": {}
}
}

I don't think this can be modified,but maybe you can find out which coordinating node(don't have data on it) the task runs on,and restart this node(Make sure you have multiple coordinating nodes and there is no service only connect this one node)

Elasticsearch version 7.14 and later support SQL tasks cancelation, but not the prior versions.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.