wqliang commented on a change in pull request #1458: [ISSUE #1457] Dynamically 
effective namesrvAddr for name server auto-scaling
URL: https://github.com/apache/rocketmq/pull/1458#discussion_r327528761
 
 

 ##########
 File path: 
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
 ##########
 @@ -493,6 +490,17 @@ private synchronized RemotingCommand 
updateBrokerConfig(ChannelHandlerContext ct
         return response;
     }
 
+    private void applyUpdatedConfig(Properties properties) {
+        if (properties.containsKey(MixAll.DUP_NAMESRV_ADDR)) {
+            String updatedNamesrvAddr = 
this.brokerController.getBrokerConfig().getNamesrvAddr();
+            
this.brokerController.getBrokerOuterAPI().updateNameServerAddressList(updatedNamesrvAddr);
 
 Review comment:
   [QUESTION]  If `fetchNamesrvAddrByAddressServer` is true and namesrAddr is 
null when broker startup, broker will update namesrv address from address 
server periodically.  After you update it , the scheduled task will overwrite 
it at next period. Maybe you should cancle the scheduled task if it exist. Or 
you can return some tips if such update schedule task exist. I think remind 
user and let him decide whether or not update and cancle the task might be 
better.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to