You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/27 07:10:01 UTC

[GitHub] [rocketmq] alaric27 commented on a diff in pull request #4218: delete useless code

alaric27 commented on code in PR #4218:
URL: https://github.com/apache/rocketmq/pull/4218#discussion_r859456984


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java:
##########
@@ -246,12 +246,6 @@ private RemotingCommand processRequest(final Channel channel, RemotingCommand re
             responseHeader.setMinOffset(getMessageResult.getMinOffset());
             responseHeader.setMaxOffset(getMessageResult.getMaxOffset());
 
-            if (getMessageResult.isSuggestPullingFromSlave()) {

Review Comment:
   I think the following code covers this logic
   `
               if (this.brokerController.getBrokerConfig().isSlaveReadEnable()) {
                   // consume too slow ,redirect to another machine
                   if (getMessageResult.isSuggestPullingFromSlave()) {
                       responseHeader.setSuggestWhichBrokerId(subscriptionGroupConfig.getWhichBrokerWhenConsumeSlowly());
                   }
                   // consume ok
                   else {
                       responseHeader.setSuggestWhichBrokerId(subscriptionGroupConfig.getBrokerId());
                   }
               } else {
                   responseHeader.setSuggestWhichBrokerId(MixAll.MASTER_ID);
               }
   `



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org