When JDBC Statement.cancel method is invoked, a KILL QUERY query is executed. If ClickHouse is started in a clustered environment, sometimes this may fail to kill the query on all nodes because the proper command is KILL QUERY ON CLUSTER. Currently, there is no way to do this.
The proposal is to add a client configuration property with a cluster name. When specified, the JDBC driver should call KILL QUERY ON CLUSTER instead of KILL QUERY.
When JDBC
Statement.cancel
method is invoked, aKILL QUERY
query is executed. If ClickHouse is started in a clustered environment, sometimes this may fail to kill the query on all nodes because the proper command isKILL QUERY ON CLUSTER
. Currently, there is no way to do this.The proposal is to add a client configuration property with a cluster name. When specified, the JDBC driver should call
KILL QUERY ON CLUSTER
instead ofKILL QUERY
.If this is difficult to achieve, at the very least lets expose the
query_id
from the Statement (https://github.com/ClickHouse/clickhouse-java/issues/392). In this case, the user will be able to invoke the command manually: