TeslaCN commented on pull request #11587:
URL: https://github.com/apache/shardingsphere/pull/11587#issuecomment-898293330


   > @tristaZero
   > This task will suspend until all the connections are released.
   > 
   > Yes,the thread is suspend too,but the client will receive the response 
when context.flush is invoked,not the time of task or thread be finished.
   > In other words,the client may send next transaction sql like 
setcommit=false to proxy at the same moment,the proxy will submit a new task to 
execute "setcommit=false",cause one BacendConnection handle its resources in 
two thread
   > you can have a look at this issue`s reason analyz part 2.
   > 
   > 
![image](https://user-images.githubusercontent.com/1589099/129314889-402270bc-4b2b-4fec-9338-cf16717cf532.png)
   
   Hi @jianliu 
   
   My understanding is if the connection status is correct, even the next 
command was sent to Proxy and a new task was put into the ThreadPool, the new 
task will `waitUntilConnectionRelease`.
   
   The current connection status may be switched to `release` incorrectly when 
transaction started. Maybe correct the connection status may fix this issue.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to