yujun777 commented on code in PR #54197:
URL: https://github.com/apache/doris/pull/54197#discussion_r2268747426
##########
fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java:
##########
@@ -122,10 +122,10 @@ private enum PublishResult {
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();
Review Comment:
there exists many calling readLock in this file, if change use concurrent
map here, since they are simple, why not remove most of the readLock in this
file ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]