-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
gorm gen关联操作导致的死锁问题 #7398
Comments
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
经过测试,假设在最后执行c.Tx.Rollback(),是无法回滚绿色框代码的,是否说明绿色代码已经不在c.Tx下了? |
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
c.Tx已经是begin后的事务了 |
@jinzhu 谢谢抽空解答,关于gorm gen里面事务跳出的问题 |
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
这是一个常规的更新admin的操作
先查询admin
然后修改他的头像,最后clear旧角色,append上新的角色
红框代码在绿框前面回导致事务等待死锁
红框代码放到绿框代码后面则不会
为什么会出现这种情况?两者不是使用同一个事务?
The text was updated successfully, but these errors were encountered: