-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问如何控制事物手动回滚? #34
Comments
我现在有一个业务,需要在新建用户后进行其它的用户相关信息的保存,是两个不同的业务实体和spring boot |
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction |
lcn transaction over, res -> groupId:jOlZWY7E and state is rollback |
是不是出现了两个模块操作同一行数据的情况了? |
LCNTransactionAspectSupport. currentTransactionStatus(). setRollbackOnly(); |
事务手动回滚 |
C是一个公共服务,A服务和B服务都引用了他 A服务新建一条数据,B服务中将这个条数据的ID设置为关联关系,在C服务中保存 就不行 会保存 而且是多次循环插入 |
C服务不是web服务.没有配置数据源 |
C 是操作数据源的服务? |
类似于 Spring的 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); 因为不一定是异常才需要回滚,我没有在文档上看到手动回滚的东西 谢谢
The text was updated successfully, but these errors were encountered: