caigy commented on code in PR #4582:
URL: https://github.com/apache/rocketmq/pull/4582#discussion_r960554605


##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -431,7 +431,7 @@ private MessageQueue getOpQueue(MessageQueue messageQueue) {
         if (opQueue == null) {
             opQueue = new 
MessageQueue(TransactionalMessageUtil.buildOpTopic(), 
messageQueue.getBrokerName(),
                 messageQueue.getQueueId());
-            opQueueMap.put(messageQueue, opQueue);
+            opQueueMap.putIfAbsent(messageQueue, opQueue);

Review Comment:
   It seems that if `opQueueMap` contains `messageQueue`, the newly created 
`opQueue` would not be put in `opQueueMap` but returned.



-- 
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]

Reply via email to