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_r190176000
##########
File path:
broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
##########
@@ -741,7 +741,7 @@ public void run() {
log.error("registerBrokerAll Exception", e);
}
}
- }, 1000 * 10, 1000 * 30, TimeUnit.MILLISECONDS);
+ }, 1000 * 10, Math.max(10000,
Math.min(brokerConfig.getRegisterNameServerPeriod(), 60000)),
TimeUnit.MILLISECONDS);
Review comment:
Name servers will mark the broker as dead and remove routes to this broker
if they do not receive registration heartbeat within 2T period. Empirically,
brokers should send heartbeats every T moments at most to maintain their
aliveness in case of occasional network failure, to tolerate one-time heartbeat
loss.
As lite heartbeat mechanism has already been implemented, it's safe to
heartbeat more frequently. This is why we allow interval of 10 seconds.
----------------------------------------------------------------
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