This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new f834f6d9f9a branch-3.1: [fix](deadlock) avoid deadlock on 
tabletInvertedIndex #54197 (#54997)
f834f6d9f9a is described below

commit f834f6d9f9aaff42b2e8e0ffdd03ac1381f041f1
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Aug 19 19:09:20 2025 +0800

    branch-3.1: [fix](deadlock) avoid deadlock on tabletInvertedIndex #54197 
(#54997)
    
    Cherry-picked from #54197
    
    Co-authored-by: Yongqiang YANG <[email protected]>
    Co-authored-by: Yongqiang YANG <[email protected]>
---
 .../org/apache/doris/transaction/DatabaseTransactionMgr.java | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
 
b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
index 3db8edb8659..c1d8018e616 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
@@ -122,10 +122,10 @@ public class DatabaseTransactionMgr {
     private final MonitoredReentrantReadWriteLock transactionLock = new 
MonitoredReentrantReadWriteLock(true);
 
     // transactionId -> running TransactionState
-    private final Map<Long, TransactionState> idToRunningTransactionState = 
Maps.newHashMap();
+    private final Map<Long, TransactionState> idToRunningTransactionState = 
Maps.newConcurrentMap();
 
     // transactionId -> final status TransactionState
-    private final Map<Long, TransactionState> idToFinalStatusTransactionState 
= Maps.newHashMap();
+    private final Map<Long, TransactionState> idToFinalStatusTransactionState 
= Maps.newConcurrentMap();
     private final Map<Long, Long> subTxnIdToTxnId = new ConcurrentHashMap<>();
 
     // The following 2 queues are to store transactionStates with final status
@@ -193,12 +193,8 @@ public class DatabaseTransactionMgr {
     }
 
     protected TransactionState getTransactionState(Long transactionId) {
-        readLock();
-        try {
-            return unprotectedGetTransactionState(transactionId);
-        } finally {
-            readUnlock();
-        }
+        return unprotectedGetTransactionState(transactionId);
+
     }
 
     private TransactionState unprotectedGetTransactionState(Long 
transactionId) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to