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

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


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

commit c8a4eb76848532ebe44bafeb9a9b3f1ad53daa96
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Aug 20 11:03:42 2025 +0800

    branch-3.0: [fix](deadlock) avoid deadlock on tabletInvertedIndex #54197 
(#54996)
    
    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