Skip to content
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

同一事务下,多次操作统一资源,每次操作都会获取相同的锁,后面的操作会获取失败 #367

Open
zkyoma opened this issue Sep 2, 2023 · 0 comments

Comments

@zkyoma
Copy link
Contributor

zkyoma commented Sep 2, 2023

Describe the bug

假设有全局事务 A,事务 A 对数据库表的某一行 B 操作了多次,第一次时会获取B对应的锁,第二次操作B时会因为第一次的占用而获取锁失败。

Environment

  • hmily version(s): 2.1.3-SNAPSHOT

Steps to reproduce

在同一个事务内部,多次更新统一资源

Expected behavior

获取全局锁时,不仅要检查当前锁是否被获取,还要判断是否已经被当前事务获取,如果是,则获取其他锁即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant