H-Jason opened a new issue, #31038:
URL: https://github.com/apache/shardingsphere/issues/31038

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.1.2
   
   
   ### Which project did you use?
   ShardingSphere-JDBC
   
   
   ### Expected behavior
   when i update table in multi mysql using  batchUpdate in  JdbcTemplate ,it 
can be executed normally。
   i have two same table in two mysql,and allocate data based on odd and even 
numbers of primary key IDs;
   for example ,id with 1,3,5 in the first DB, and id with 2,4,6 in second db ;
   
   `
   String sql =  "Update mytable set  name = ?  where id = ?"
   List<Object[]> batchArgs = new ArrayList<>();
   batchArgs.add(new Object[]{"value1", idone});
   batchArgs.add(new Object[]{"value3", idtwo});
   int[] updateCounts = jdbcTemplate.batchUpdate(sql, batchArgs);
   `
   It will deadlock in multi db when multi thread excuting these code;
   
   ### Actual behavior
   Deadlocks
   
   ### Reason analyze
   
   
![图片](https://github.com/apache/shardingsphere/assets/30381165/ca5940f7-e512-408a-8841-150a88a1c79d)
   
   
   


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