Simbafa opened a new issue #8903:
URL: https://github.com/apache/shardingsphere/issues/8903
## Bug Report
### Which version of ShardingSphere did you use?
The latest version, 5.0.0-alpha
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Multiple connections commit transactions correctly.
### Actual behavior
ShardingSphere-Proxy stops working, has no response for any requests.
### Reason analyze (If you can)
```
"ShardingSphere-Command-0" Id=18 RUNNABLE (in native)
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at
com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:101)
at
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:144)
at
com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:174)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3008)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3469)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3459)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3900)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1281)
at
com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:782)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
at
com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.accessor.impl.PreparedStatementAccessor.execute(PreparedStatementAccessor.java:45)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:84)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:77)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:48)
at
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.impl.DefaultSQLExecutorCallback.execute0(DefaultSQLExecutorCallback.java:75)
at
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.impl.DefaultSQLExecutorCallback.execute(DefaultSQLExecutorCallback.java:57)
at
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.syncExecute(ExecutorKernel.java:99)
at
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.serialExecute(ExecutorKernel.java:84)
at
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.execute(ExecutorKernel.java:78)
at
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.SQLExecutor.execute(SQLExecutor.java:65)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.executeWithManagedResource(JDBCExecuteEngine.java:130)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:123)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:103)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecute(JDBCDatabaseCommunicationEngine.java:93)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:79)
at
org.apache.shardingsphere.proxy.frontend.mysql.command.query.binary.execute.MySQLComStmtExecuteExecutor.execute(MySQLComStmtExecuteExecutor.java:71)
at
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:100)
at
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
- 1. modify conf/server.yaml
- set acceptor.size: 1
- 2. create test app
- create n threads , where n>acceptor.size
- if n<=acceptor.size, ShardingSphere works well.
- In the threads, start transaction, do some things, and then commit
- conn.setAutoCommit(false);
- select * from table1 where fid=1 for update
- update table1 set fint=fint+1 where fid=1
- conn.commit()
The most important thing is that the threads number must bigger than the
acceptor.size.
### Example codes for reproduce this issue (such as a github link).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]