Skip to content

Commit fabccea

Browse files
authored
bugfix: Lock contention failure in file & Raft mode did not exit (#6932)
1 parent 077d8a2 commit fabccea

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

changes/en-us/2.x.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Add changes here for all PR submitted to the 2.x branch.
1414
- [[#6907](https://github.com/apache/incubator-seata/pull/6907)] fix the issue of Codecov not generating reports
1515
- [[#6923](https://github.com/apache/incubator-seata/pull/6923)] Enhance 401 Error Handling by Refreshing Token
1616
- [[#6925](https://github.com/apache/incubator-seata/pull/6925)] fix the issue in Raft model a follower's crash may lead to the continued use of expired tokens
17+
- [[#6932](https://github.com/apache/incubator-seata/pull/6932)] when enabling local transactions, the lock contention failure in file & raft mode does not exit, leading to a lingering lock
1718

1819
### optimize:
1920
- [[#6826](https://github.com/apache/incubator-seata/pull/6826)] remove the branch registration operation of the XA read-only transaction

changes/zh-cn/2.x.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [[#6907](https://github.com/apache/incubator-seata/pull/6907)] 修复Codecov未生成报告的问题
1515
- [[#6923](https://github.com/apache/incubator-seata/pull/6923)] 增强 401 错误处理,通过刷新令牌
1616
- [[#6925](https://github.com/apache/incubator-seata/pull/6925)] 修复Raft模式下,Follower崩溃可能导致Client继续使用过期令牌的问题
17+
- [[#6932](https://github.com/apache/incubator-seata/pull/6932)] 修复开启本地事务时file&raft模式下锁争抢失败未退出导致可能出现残留锁
1718

1819

1920
### optimize:

server/src/main/java/org/apache/seata/server/storage/file/lock/FileLocker.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,8 @@ public boolean acquireLock(List<RowLock> rowLocks, boolean autoCommit, boolean s
108108
failFast = true;
109109
break;
110110
}
111-
if (canLock) {
112-
canLock = false;
113-
if (autoCommit) {
114-
break;
115-
}
116-
}
111+
canLock = false;
112+
break;
117113
}
118114
}
119115
if (failFast) {

0 commit comments

Comments
 (0)