版本2.5.11
5FE 11BE
jdk 11
最近测试长链接,发现会出现会话中断的情况,于是自己写了个脚本测试下,复现
测试脚本:
echo `date`
mysql -u root -h 10.133.xxx.xx -P 9030 -p -D xxx -e "select now();select sleep(3590);select now();select sleep(3600);select now();"
echo `date`
测试结果:
Thu Nov 9 09:41:00 CST 2023
mysql: [Warning] Using a password on the command line interface can be insecure.
now()
2023-11-09 09:41:00
sleep(3590)
1
now()
2023-11-09 10:40:50
Terminal close -- query aborted
Thu Nov 9 11:21:46 CST 2023
其中11:21:46链接中断,去fe.warn.log中发现以下日志:
2023-11-09 11:21:46,899 WARN (starrocks-mysql-nio-pool-29184|3977275) [ConnectContext.kill():598] kill query, 10.133.xx.xx:37482, kill connection: false
2023-11-09 11:21:46,899 WARN (starrocks-mysql-nio-pool-29184|3977275) [Coordinator.cancel():1613] cancel execution of query, this is outside invoke
想知道这个kill query的原因是什么?