jihanchen888 commented on issue #12337:
URL: https://github.com/apache/dubbo/issues/12337#issuecomment-1560494822

   好的,了解了
   我看了下最新版3.2.2 版本代码,在多机房注册中心时候,这边这个配置刷只会生效到一个机房吧? 
第一个机房配置刷新后从新暴露设置到bounds中,后面机房循环进来更新时bounds中获取的exporterInvoker.getUrl()其实是之前更新过的,比较之后作为没有变更对应配置项就不会被更新
   ```
        public synchronized void doOverrideIfNecessary() {
               final Invoker<?> invoker;
               if (originInvoker instanceof InvokerDelegate) {
                   invoker = ((InvokerDelegate<?>) originInvoker).getInvoker();
               } else {
                   invoker = originInvoker;
               }
               //The origin invoker
               URL originUrl = RegistryProtocol.this.getProviderUrl(invoker);
               String key = getCacheKey(originInvoker);
               ExporterChangeableWrapper<?> exporter = bounds.get(key);
               if (exporter == null) {
                   logger.warn(INTERNAL_ERROR, "unknown error in registry 
module", "", "error state, exporter should not be null", new 
IllegalStateException("error state, exporter should not be null"));
                   return;
               }
               //The current, may have been merged many times
               Invoker<?> exporterInvoker = exporter.getInvoker();
               URL currentUrl = exporterInvoker == null ? null : 
exporterInvoker.getUrl();
               //Merged with this configuration
               URL newUrl = getConfiguredInvokerUrl(configurators, originUrl);
               newUrl = 
getConfiguredInvokerUrl(getProviderConfigurationListener(originUrl).getConfigurators(),
 newUrl);
               newUrl = 
getConfiguredInvokerUrl(serviceConfigurationListeners.get(originUrl.getServiceKey())
                   .getConfigurators(), newUrl);
               if (!newUrl.equals(currentUrl)) {
                   if (newUrl.getParameter(Constants.NEED_REEXPORT, true)) {
                       RegistryProtocol.this.reExport(originInvoker, newUrl);
                   }
                   logger.info("exported provider url changed, origin url: " + 
originUrl +
                       ", old export url: " + currentUrl + ", new export url: " 
+ newUrl);
               }
           }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to