lizhanhui 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_r190179976
##########
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:
We may set the interval to 0 to fix unit tests. Purpose of this pull
requests is to group changes and register them all periodically. Users are
unlikely to administratively create a topic and send messages immediately. IMO,
this change won't bring about much confusion. I won't say no if we keep the
default value 0 to maintain behavioral consistency between before and after
this pull requests.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services