jianliu commented on issue #11583:
URL: 
https://github.com/apache/shardingsphere/issues/11583#issuecomment-898443415


   I have make a mistake when analyz the reason,because of missing an important 
info,between pre tps and next tps.
   ```
   #first statements
   set autocommit=false     -- sql1:thread1
   select  * from tablexx where sharding_key=?  -- sql2:thread2
   update  tablexx set x=x where sharding_key=?  -- sql3:thread3
   commit -- sql4:thread4
   context.flush 
   close resources because there is no transaction yet after commit
   
   #the second sql by framework (hikari)
   set autocommit=true-- sql1:thread10 this sql is request by datasource 
framework when connection is close(back to pool)
   context.flush
   close resources because there is no transaction at all
   
   #the thrid statement 
   set autocommit=false     -- sql1:thread6
   select  * from tablexx where sharding_key=?  -- sql2:thread7
   ```
   Here is the logs:
   
![image](https://user-images.githubusercontent.com/1589099/129360520-156f26e7-3960-47f9-b844-cdab850554c4.png)
   
   The second sql (setAutoCommit(true) between the first and the thrid 
statement send by framework cause this erorr,because it removes the third 
sql(setAutoCommit:false) `s connectionPostProcessor,and lead this error finally


-- 
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