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 2018/05/23 09:15:03 UTC

[GitHub] dongeforever commented on a change in pull request #312: [ISSUE#311] Improve broker register topicrouter info performance

dongeforever commented on a change in pull request #312: [ISSUE#311] Improve broker register topicrouter info performance
URL: https://github.com/apache/rocketmq/pull/312#discussion_r190176153
 
 

 ##########
 File path: broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
 ##########
 @@ -245,7 +245,10 @@ private RemotingCommand updateAndCreateTopic(ChannelHandlerContext ctx,
         topicConfig.setTopicSysFlag(requestHeader.getTopicSysFlag() == null ? 0 : requestHeader.getTopicSysFlag());
 
         this.brokerController.getTopicConfigManager().updateTopicConfig(topicConfig);
-        this.brokerController.registerBrokerAll(false, true, true);
+
+        if (brokerController.getBrokerConfig().getRegisterNameServerPeriod() == 0) {
+            this.brokerController.registerBrokerAll(false, true, true);
 
 Review comment:
   If could not get the topic route info immediately after the topic is created, this may fail some unit tests and confuse some users.
   
   It may be better to detect if the topic route  info is changed, and then decide whether it is necessary to register or not.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services