情况:
org.springframework.dao.CannotAcquireLockException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
### The error may involve com.yiexpress.core.dao.CreditMapper.updateByPrimaryKeySelective-Inline
### The error occurred while setting parameters
### SQL: update credit
@事务
Method{
Child1
child2
}
@事务
Child1{
更新a表
}
@事务
child2{
更新a表
}
一个事务方法里面有两个子事务
两个子事务里面都有一个更新一张表的方法。
导致 child1的事务锁定了这张表。
你是否有遇见呢???还有什么情况会导致?