From dbdb07209f5b61c85bbf0615bc89eaa3f0b2d68c Mon Sep 17 00:00:00 2001 From: shroman Date: Mon, 16 Jan 2017 16:38:14 +0800 Subject: [PATCH] [ROCKETMQ-47] Avoid broker updates of NameServer address list on startup twice, closes apache/incubator-rocketmq#42 --- .../java/org/apache/rocketmq/broker/BrokerController.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java index af69001c..b656870b 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java @@ -156,11 +156,6 @@ public class BrokerController { this.brokerOuterAPI = new BrokerOuterAPI(nettyClientConfig); this.filterServerManager = new FilterServerManager(this); - if (this.brokerConfig.getNamesrvAddr() != null) { - this.brokerOuterAPI.updateNameServerAddressList(this.brokerConfig.getNamesrvAddr()); - log.info("user specfied name server address: {}", this.brokerConfig.getNamesrvAddr()); - } - this.slaveSynchronize = new SlaveSynchronize(this); this.sendThreadPoolQueue = new LinkedBlockingQueue(this.brokerConfig.getSendThreadPoolQueueCapacity()); @@ -317,6 +312,7 @@ public class BrokerController { if (this.brokerConfig.getNamesrvAddr() != null) { this.brokerOuterAPI.updateNameServerAddressList(this.brokerConfig.getNamesrvAddr()); + log.info("Set user specified name server address: {}", this.brokerConfig.getNamesrvAddr()); } else if (this.brokerConfig.isFetchNamesrvAddrByAddressServer()) { this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() { -- GitLab