linghengqian commented on issue #30300:
URL: 
https://github.com/apache/shardingsphere/issues/30300#issuecomment-1965705272

   > Why is transaction consistency guaranteed for multiple database 
operations? 
   
   - To make a long story short, when you need the concept of transactions in 
your business, you need distributed transactions of distributed databases. This 
is a feature that is created on demand. You can read the relevant documents.
   
   > How to simulate that local operations on multiple data sources do not meet 
distributed transaction consistency?
   
   - The example module does not show the relevant rollback operation, but it 
should not be difficult to simulate. The simplest way is that you only need to 
use the JTA annotation of the local transaction for the logical data source of 
shardingsphere or manually set `setAutoCommit()`, `commit()` and `rollback()` 
of `java.sql.Connection` to convert the corresponding transaction operation 
into a distributed transaction. The relevant integration test is located at 
https://github.com/apache/shardingsphere/tree/master/test .
   
   - Documents like 
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/special-api/transaction/seata/
 mark common JTA annotations.


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