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


##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java:
##########
@@ -187,6 +190,39 @@ public void check(long transactionTimeout, int 
transactionCheckMax,
                             }
                         }
 
+                        if 
(BrokerRole.SLAVE.equals(this.transactionalMessageBridge.getBrokerController().getMessageStoreConfig().getBrokerRole())
+                            && 
this.transactionalMessageBridge.getBrokerController().getMinBrokerIdInGroup()
+                            == 
this.transactionalMessageBridge.getBrokerController().getBrokerIdentity().getBrokerId()
+                            && 
this.transactionalMessageBridge.getBrokerController().getBrokerConfig().isEnableSlaveActingMaster()

Review Comment:
   new order:
   
   1. check EnableSlaveActingMaster first for default false;
   2. check brokerId for only 1 broker meeting this condition in a cluster;
   3. check broker role.



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