[Multi-threading] Inserting large batches of data into multiple tables, how do you know that multiple tables have been inserted successfully?

1. Multi-threaded, programmatic transaction (the transaction management provided by spring is useless at this time), enter multi-threading, open transaction ~ successful execution, commit transaction ~ catch exception, transaction rollback ~ finally lock closed

2. Batch insert batch insert

3. The lock provided by java ensures that each thread is notified to the main thread after the successful execution is completed

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325252942&siteId=291194637