You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[jdbc-v2] Investigate test failure on CH head version #3264
[ERROR] StatementTest.testCancelOnCluster:747 » SQL com.clickhouse.client.api.ServerException: Code: 785. DB::Exception: No query to kill. (NOTHING_TO_KILL) (version 26.11.1.880 (official build)) (queryId= 5a7ada78-1727-428d-a1cc-d747a1a364c9)
[ERROR] StatementTest.testConcurrentCancel:760 » SQL com.clickhouse.client.api.ServerException: Code: 785. DB::Exception: No query to kill. (NOTHING_TO_KILL) (version 26.11.1.880 (official build)) (queryId= 403c0e75-837b-476c-a2fb-5fa19c8ed8bb)
Is this timing issue or something changed in logic? What is the proper way to kill the query?
We need to make sure that this error do not cause breaking application code with no reason (should it be a warning) ?
This is a server logic change, not a timing problem. ClickHouse 26.11 enables kill_throw_if_noop by default (ClickHouse/ClickHouse#125968, "Backward Incompatible Change"). With this setting, a local KILL QUERY that matches no running query fails with NOTHING_TO_KILL (785). ON CLUSTER stays tolerant. The setting exists since 26.10, where the default is 0.
In both tests cancel() runs when the statement has no running query. In testCancelOnCluster the SELECT 1 is already finished. In testConcurrentCancel the query is not started yet, and lastQueryId can still be null. Verified on 26.11.1.888 (head) and on 26.10.3.7 with kill_throw_if_noop=1.
KILL QUERY WHERE query_id = ... is still the correct way to kill the query. When there is no running query, there is nothing to cancel, so this must not be an error for the application. Fix: #3271. Statement.cancel() now ignores NOTHING_TO_KILL and writes a debug log, in sync and async mode. Other KILL QUERY errors are thrown as before. The fix does not send kill_throw_if_noop=0, because servers before 26.10 reject the unknown setting.
Activity
chernser commentedon Oct 29, 2026
@polyglotAI-bot please investigate the issue and fix it.
polyglotAI-bot commentedon Oct 29, 2026
This is a server logic change, not a timing problem. ClickHouse 26.11 enables
kill_throw_if_noopby default (ClickHouse/ClickHouse#125968, "Backward Incompatible Change"). With this setting, a localKILL QUERYthat matches no running query fails withNOTHING_TO_KILL(785).ON CLUSTERstays tolerant. The setting exists since 26.10, where the default is0.In both tests
cancel()runs when the statement has no running query. IntestCancelOnClustertheSELECT 1is already finished. IntestConcurrentCancelthe query is not started yet, andlastQueryIdcan still benull. Verified on 26.11.1.888 (head) and on 26.10.3.7 withkill_throw_if_noop=1.KILL QUERY WHERE query_id = ...is still the correct way to kill the query. When there is no running query, there is nothing to cancel, so this must not be an error for the application. Fix: #3271.Statement.cancel()now ignoresNOTHING_TO_KILLand writes adebuglog, in sync and async mode. OtherKILL QUERYerrors are thrown as before. The fix does not sendkill_throw_if_noop=0, because servers before 26.10 reject the unknown setting.[jdbc-v2] Do not fail Statement.cancel() when there is no running query