The kill command is invalid

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: kill 命令无效

| username: 等一分钟

【TiDB Usage Environment】Production Environment
【TiDB Version】6.5.1
Killing the slow SQL ID online did not take effect.

| username: 等一分钟 | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: weixiaobing | Original post link

It might be that the SQL execution took too long, and the rollback needs some time.

| username: 等一分钟 | Original post link

[2023/04/24 18:09:52.905 +08:00] [INFO] [server.go:769] [kill] [connID=5853656969768947107] [query=false]
[2023/04/24 18:09:54.345 +08:00] [WARN] [server.go:612] [“Server.onConn handshake”] [conn=5853656969768958439] [error=“write tcp 10.0.254.170:4000->100.116.243.1:49886: write: connection reset by peer”] [“remote addr”=100.116.243.1:49886]
[2023/04/24 18:09:54.686 +08:00] [WARN] [server.go:612] [“Server.onConn handshake”] [conn=5853656969768958441] [error=“write tcp 10.0.254.170:4000->100.116.152.1:32183: write: connection reset by peer”] [“remote addr”=100.116.152.1:32183]

| username: 等一分钟 | Original post link

SELECT statements do not need to be rolled back, right?

| username: Jellybean | Original post link

Have you enabled the global kill feature parameter?

Or explicitly log in to the TiDB server where the SQL is located and then execute the kill operation.

| username: 胡杨树旁 | Original post link

There is this bug in version 5.1, where executing the kill command results in the SQL not being terminated. However, your version is 6.1, which should have already fixed this issue. Are you sure you logged into the corresponding node?

| username: TiDBer_pkQ5q1l0 | Original post link

It still looks like a BUG.

| username: DBRE | Original post link

I’ve encountered this many times. Even if it’s not a slow SQL, it can’t be killed, and I end up restarting the TiDB server. :joy:

| username: 等一分钟 | Original post link

The kill command was executed in the tidb_server.

What is the function of global kill?

| username: tidb菜鸟一只 | Original post link

It means that a TiDB node can kill all TiDB processes within the cluster.

| username: wakaka | Original post link

It should be a bug. I’ve encountered this issue in many versions.

| username: 等一分钟 | Original post link

:innocent:

| username: Jellybean | Original post link

enable-global-kill Introduced Starting from Version v6.1.0

  • Used to enable the Global Kill (terminate queries or connections across nodes) feature
| username: TiDBer_pkQ5q1l0 | Original post link

BUG, can’t be killed, can only be restarted.

| username: Running | Original post link

Enable the Global Kill attribute.