liuruiyiyang 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_r327943882
 
 

 ##########
 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:
   In current design, the priority of ```mqadmin updateBrokerConfig 
namesrvAddr``` is lower than ```fetchNamesrvAddrByAddressServer```, which means 
the scheduled task will overwrite it. The purpose of this PR is to enable 
dynamically effective namesrvAddr for name server auto-scaling when 
```fetchNamesrvAddrByAddressServer``` scheduled task is not enabled. If the 
```fetchNamesrvAddrByAddressServer``` scheduled task is enabled, it already 
have the ability of  dynamically effective.
   
   Therefore, I don't think we should cancel the scheduled task.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to