dmagda commented on a change in pull request #8280:
URL: https://github.com/apache/ignite/pull/8280#discussion_r496232852
##########
File path: docs/_docs/sql-reference/operational-commands.adoc
##########
@@ -113,3 +113,120 @@ After executing the above command and *closing the JDBC
connection*, all data wi
image::images/set-streaming.png[]
+== KILL QUERY
+
+The `KILL QUERY` command allows you to cancel a running query.
+
+[source,sql]
+----
+KILL QUERY {ASYNC} '<query_id>'
+----
+
+=== Description
+`ASYNC` is an optional parameter which returns control immediately without
waiting for the cancellation to finish, and `query_id` can be retrieved via the
`SQL_QUERIES` view.
+
+When a query cancelled via the `KILL` command, all parts of the query running
on all other nodes are cancelled.
+
+This command available via JMX and CMD, also:
+
+- `QueryMXBean#cancelSQL`
+- `./control.sh --kill SQL query_id`
+
+== KILL TRANSACTION
+
+The `KILL TRANSACTION` command allows you to cancel a running transaction.
+
+[source,sql]
+----
+KILL TRANSACTION 'xid'
+----
+
+=== Description
+`xid` of the transaction can be retrived via the `TRANSACTIONS` view.
+
+This command available via JMX and CMD, also:
+
+- `TransactionMXBean#cancel`
+- `./control.sh --kill TRANSACTION xid`
Review comment:
I would add an explanation on how to find the "xid" that needs to be
passed into this command.
##########
File path: docs/_docs/sql-reference/operational-commands.adoc
##########
@@ -113,3 +113,120 @@ After executing the above command and *closing the JDBC
connection*, all data wi
image::images/set-streaming.png[]
+== KILL QUERY
+
+The `KILL QUERY` command allows you to cancel a running query.
+
+[source,sql]
+----
+KILL QUERY {ASYNC} '<query_id>'
+----
+
+=== Description
+`ASYNC` is an optional parameter which returns control immediately without
waiting for the cancellation to finish, and `query_id` can be retrieved via the
`SQL_QUERIES` view.
+
+When a query cancelled via the `KILL` command, all parts of the query running
on all other nodes are cancelled.
+
+This command available via JMX and CMD, also:
+
+- `QueryMXBean#cancelSQL`
+- `./control.sh --kill SQL query_id`
+
+== KILL TRANSACTION
+
+The `KILL TRANSACTION` command allows you to cancel a running transaction.
+
+[source,sql]
+----
+KILL TRANSACTION 'xid'
+----
+
+=== Description
+`xid` of the transaction can be retrived via the `TRANSACTIONS` view.
+
+This command available via JMX and CMD, also:
+
+- `TransactionMXBean#cancel`
+- `./control.sh --kill TRANSACTION xid`
+
+== KILL SCAN
+
+The `KILL SCAN` command allows you to cancel a running scan query.
+
+[source,sql]
+----
+KILL SCAN 'origin_node_id' 'cache_name' query_id
+----
+
+=== Description
+`origin_node_id`, `cache_name`, `query_id` parameters can be retrived via the
`SCAN_QUERIES`.
+
+This command available via JMX and CMD, also:
+
+- `QueryMXBean#cancelScan`
+- `./control.sh --kill SCAN origin_node_id cache_name query_id`
+
+=== Example
+
+[source,sql]
+----
+KILL SCAN '6fa749ee-7cf8-4635-be10-36a1c75267a7_54321' 'cache-name' 1
+----
+
+== KILL COMPUTE
+
+The `KILL COMPUTE` command allows you to cancel a running compute.
+
+[source,sql]
+----
+KILL COMPUTE 'session_id'
+----
+
+=== Description
+`session_id` parameter can be retrived via the `TASKS` or `JOBS` view.
+
+This command available via JMX and CMD, also:
+
+- `ComputeMXBean#cancel`
+- `./control.sh --kill COMPUTE session_id`
Review comment:
Same here. Let's explain how to find the "session_id" and the
"routine_id" for the continuous query-specific command below.
##########
File path: docs/_docs/sql-reference/operational-commands.adoc
##########
@@ -113,3 +113,120 @@ After executing the above command and *closing the JDBC
connection*, all data wi
image::images/set-streaming.png[]
+== KILL QUERY
+
+The `KILL QUERY` command allows you to cancel a running query.
+
+[source,sql]
+----
+KILL QUERY {ASYNC} '<query_id>'
+----
+
+=== Description
+`ASYNC` is an optional parameter which returns control immediately without
waiting for the cancellation to finish, and `query_id` can be retrieved via the
`SQL_QUERIES` view.
+
+When a query cancelled via the `KILL` command, all parts of the query running
on all other nodes are cancelled.
+
+This command available via JMX and CMD, also:
+
+- `QueryMXBean#cancelSQL`
Review comment:
Could you please wrap this command example (and all others down below)
up with the ascii [tabs] tag? Where the first tab shows the snipped for Unix
systems (control.sh) while the second is dedicated for Windows users
(control.bat)?
Here is an example:
https://github.com/apache/ignite/blame/IGNITE-7595/docs/_docs/includes/starting-node.adoc#L10
##########
File path: docs/_docs/sql-reference/operational-commands.adoc
##########
@@ -113,3 +113,120 @@ After executing the above command and *closing the JDBC
connection*, all data wi
image::images/set-streaming.png[]
+== KILL QUERY
+
+The `KILL QUERY` command allows you to cancel a running query.
+
+[source,sql]
+----
+KILL QUERY {ASYNC} '<query_id>'
+----
+
+=== Description
+`ASYNC` is an optional parameter which returns control immediately without
waiting for the cancellation to finish, and `query_id` can be retrieved via the
`SQL_QUERIES` view.
+
+When a query cancelled via the `KILL` command, all parts of the query running
on all other nodes are cancelled.
+
+This command available via JMX and CMD, also:
+
+- `QueryMXBean#cancelSQL`
+- `./control.sh --kill SQL query_id`
Review comment:
I would add a paragraph saying how to find the "query_id" parameter.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]