This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8e365e873dc [fix](txn insert) sub txn map is not thread safe (#37265)
8e365e873dc is described below
commit 8e365e873dc565bc85e132a06e54ad3a93214bca
Author: meiyi <[email protected]>
AuthorDate: Sun Jul 7 18:18:07 2024 +0800
[fix](txn insert) sub txn map is not thread safe (#37265)
## Proposed changes
The sub txn map in DatabaseTransactionMgr is not thread safe
---
.../main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 df9802f5eaa..cd2ae903986 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
@@ -135,7 +135,7 @@ public class DatabaseTransactionMgr {
// transactionId -> final status TransactionState
private final Map<Long, TransactionState> idToFinalStatusTransactionState
= Maps.newHashMap();
- private final Map<Long, Long> subTxnIdToTxnId = Maps.newHashMap();
+ private final Map<Long, Long> subTxnIdToTxnId = new ConcurrentHashMap<>();
// The following 2 queues are to store transactionStates with final status
// These queues are mainly used to avoid traversing all txns and speed up
the cleaning time
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]