同一事务下,多次操作统一资源,每次操作都会获取相同的锁,后面的操作会获取失败
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the bug
假设有全局事务 A,事务 A 对数据库表的某一行 B 操作了多次,第一次时会获取B对应的锁,第二次操作B时会因为第一次的占用而获取锁失败。
## Environment
- hmily version(s): 2.1.3-SNAPSHOT
## Steps to reproduce
在同一个事务内部,多次更新统一资源
## Expected behavior
获取全局锁时,不仅要检查当前锁是否被获取,还要判断是否已经被当前事务获取,如果是,则获取其他锁即可。
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file, test, or entry point is named. Start by tracing global-lock acquisition for repeated updates to the same database row within one global transaction, then reproduce the second-operation failure. Done means the transaction can recognize its existing lock ownership and complete subsequent operations without lock acquisition failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100