tuohai666 opened a new issue #9341:
URL: https://github.com/apache/shardingsphere/issues/9341


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   Execute DDL in concurrency correctly.
   
   ### Actual behavior
   
   Connections may block when execute DDL in concurrency.
   
   When I use sysbench to test the benchmark of ShardingSphere-Proxy, the 
prepare step blocked. The sysbench command as following:
   
   ```
   sysbench --mysql-host=xxx.xxx.xxx.xxx --mysql-port=3307 --mysql-user=root 
--mysql-password='root' --mysql-db=sharding_db --tables=10 --table-size=0 
--report-interval=10 --time=0 --num-threads=100 --max-requests=0 
--percentile=99 --range_selects=off 
--test=/usr/local/share/sysbench/oltp_write_only.lua prepare
   ```
   
   This command helps to create tables and indexes:
   
   ```
   Initializing worker threads...
   
   Creating table 'sbtest7'...
   Creating table 'sbtest6'...
   Creating table 'sbtest9'...
   Creating table 'sbtest8'...
   Creating table 'sbtest2'...
   Creating table 'sbtest5'...
   Creating table 'sbtest1'...
   Creating table 'sbtest4'...
   Creating table 'sbtest10'...
   Creating table 'sbtest3'...
   Creating a secondary index on 'sbtest8'...
   Creating a secondary index on 'sbtest1'...
   Creating a secondary index on 'sbtest7'...
   Creating a secondary index on 'sbtest4'...
   Creating a secondary index on 'sbtest9'...
   Creating a secondary index on 'sbtest5'...
   Creating a secondary index on 'sbtest6'...
   Creating a secondary index on 'sbtest10'...
   Creating a secondary index on 'sbtest3'...
   Creating a secondary index on 'sbtest2'...
   ```
   
   The script hangs and will never be finished.
   
   From the perspective of the network:
   I tracked the port 42048, and found the SQL command 'CREATE INDEX' did not 
get a 'Response OK' packet.
   
   
![image](https://user-images.githubusercontent.com/24643893/106998136-fbbf5680-67be-11eb-9024-f2728eea2f40.png)
   
   ### Reason analyze (If you can)
   
   The state of Proxy may incorrect when execute DDL, lead to skip executing 
the SQL command.
   
   
![image](https://user-images.githubusercontent.com/24643893/106998581-b2233b80-67bf-11eb-997a-51b0b5c95cef.png)
   
   SignalAll() may take affect before the eventbus before it. If so, the state 
will incorrect(still in Lock state) when the wait thread is notified, and the 
thread will execute nothing.
   
   
![image](https://user-images.githubusercontent.com/24643893/106998870-28c03900-67c0-11eb-96bb-6ccbef7603a3.png)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### 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]


Reply via email to