mayfsac opened a new issue, #18897:
URL: https://github.com/apache/shardingsphere/issues/18897

   ## Question
   Why DriverJDBCExecutor#executor  do not handle the error result of branch 
thread execution?
    DriverJDBCExecutor#executor:
   
   
![image](https://user-images.githubusercontent.com/43204877/177512854-6437ce45-89f5-431a-9365-e899755c8555.png)
   JDBCExecutorCallback#execute:
   
![image](https://user-images.githubusercontent.com/43204877/177512621-edf3fba5-1801-4d0d-846a-eece36fbb9dc.png)
   
   In this way, the result of the overall sql execution is inconsistent with 
the expected result.
   
   eg:
   insert into xx_table (id,xxx,xxx) values (1,xx,xxx),(2,xxx,xxx);
   
   This statement will route to two datasources, ds0, ds1.
   
   If there is a row with primary key 1 in ds1, it will throw exception: 
Duplicate entry '1' for key 'PRIMARY';
   The final result is: the sql routed to ds0 is successfully executed, and the 
sql execution of ds1 fails.
   
   Why is it not processed as all failures, which leads to data inconsistency, 
and distributed transactions will not be rolled back
   
   
   


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