Igniters,

Below is a proposed design for thin client SQL management and monitoring to
cancel a queries.

1) Ignite expose system SQL view with name *running_queries*
proposed columns: *node_id, query_id, sql, schema_name, connection_id,
duration*.

node_id - initial node of request
query_id - unique id of query on node
sql - text of query
schema name - name of sql schema
connection_id - id of client connection from ClientListenerConnectionContext
class
duration - duration in millisecond from start of query


Ignite will gather info about running queries from each of nodes and
collect it during user query. We already have most of the information
at GridRunningQueryInfo
on each of nodes.

Instead of duration we can use start_time, but I think duration will be
simple to use due to it not depend on a timezone.


2) Propose to use following syntax to kill a running query:

*KILL QUERY node_Id query_id*


Both parameters node_id and query_id can be get through running_queries
system view.

When a node receive such request it can be run locally in case node have
given node_id or send message to node with given id. Because node have
information about local running queries then can cancel it - it already
implemented in GridReduceQueryExecutor.cancelQueries(qryId) method.

Comments are welcome.
-- 
Живи с улыбкой! :D

Reply via email to