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:

JDBCExecutorCallback#execute:

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]