You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/05 03:51:39 UTC

[GitHub] [shardingsphere] userkdg opened a new issue #14525: In the proxy, the SQL submitted by the client cannot be killed

userkdg opened a new issue #14525:
URL: https://github.com/apache/shardingsphere/issues/14525


   ### Which version of ShardingSphere did you use?
   5.1.0-GA
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Proxy
   
   ### Expected behavior
   when submit a slow sql , client can kill sql process;
   
   ### Actual behavior
   can not kill process and sql will continue execute on database, due to kill ${pid} unkown.
   
   ``` java 
   [INFO ] 2022-01-05 11:36:32.710 [Connection-6-ThreadExecutor] ShardingSphere-SQL - Logic SQL: KILL QUERY 5
   [INFO ] 2022-01-05 11:36:32.710 [Connection-6-ThreadExecutor] ShardingSphere-SQL - SQLStatement: MySQLKillStatement(threadId=5)
   [INFO ] 2022-01-05 11:36:32.710 [Connection-6-ThreadExecutor] ShardingSphere-SQL - Actual SQL: ec_order_tys ::: KILL QUERY 5
   [ERROR] 2022-01-05 11:36:32.766 [Connection-6-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.sql.SQLException: Unknown thread id: 5
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
   	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
   	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
   	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
   	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
   	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
   	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2449)
   	at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
   	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:939)
   	at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:103)
   	at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.impl.ProxyStatementExecutorCallback.execute(ProxyStatementExecutorCallback.java:40)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:73)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:66)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.callback.ProxyJDBCExecutorCallback.executeSQL(ProxyJDBCExecutorCallback.java:44)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:85)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:64)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:101)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:97)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:82)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:65)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.ProxyJDBCExecutor.execute(ProxyJDBCExecutor.java:71)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.useDriverToExecute(ProxySQLExecutor.java:153)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:124)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:116)
   	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.doExecute(DatabaseCommunicationEngine.java:200)
   	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:165)
   	at org.apache.shardingsphere.proxy.backend.text.data.impl.UnicastDatabaseBackendHandler.execute(UnicastDatabaseBackendHandler.java:62)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:62)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.singleCommandExecutor(CommandExecutorTask.java:124)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:118)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:73)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   	at java.lang.Thread.run(Thread.java:748)
   ``` 
   ### Reason analyze (If you can)
   In the proxy, the SQL process id submitted to the database does not correspond to the id managed by the proxy, resulting in the failure to kill the SQL process. 
   > proxy manage pid had bug or unimplement.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   normal sql 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN commented on issue #14525: In the proxy, the SQL submitted by the client cannot be killed

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #14525:
URL: https://github.com/apache/shardingsphere/issues/14525#issuecomment-1081347795


   Aborting query is a little complicated. We may do this in future release.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN commented on issue #14525: In the proxy, the SQL submitted by the client cannot be killed

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #14525:
URL: https://github.com/apache/shardingsphere/issues/14525#issuecomment-1005392683


   @userkdg Thanks for your feedback. Killing process is not implemented yet.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org