- 数据库:Mysql中“select … for update”排他锁分析
https://blog.csdn.net/claram/article/details/54023216 - select语句for update作用
https://blog.csdn.net/kb5706/article/details/7488521 - mysql 死锁日志,说的很详细,但不全
https://mp.weixin.qq.com/s/yzXbbutzVJ1hIZgVszIBgw
先记下,后续再补充
问题:
org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: org.apache.ibatis.executor.BatchExecutorException: com.elex.cok.puredb.dao.UserExchangeCodeMapper.insertBatch (batch index #31) failed. 30 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Deadlock found when trying to get lock; try restarting transacti
优化:
1、参考竞技场,玩家会母服不删数据
2、j对这几个表,进行单独删除,先查出来,再根据主键key删除