dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] beiwei30 opened a new issue #1725: System property dubbo.registry.address cannot have multiple values
Date Wed, 02 May 2018 06:00:11 GMT
beiwei30 opened a new issue #1725: System property dubbo.registry.address cannot have multiple
values
URL: https://github.com/apache/incubator-dubbo/issues/1725
 
 
   In com.alibaba.dubbo.config.AbstractInterfaceConfig#checkRegistry, there's code snippet
to handle backward compatibility when there are multiple registry addresses in `dubbo.registry.address`,
say: "addr1|addr2":
   
   ```java
           // for backward compatibility
           if (registries == null || registries.isEmpty()) {
               String address = ConfigUtils.getProperty("dubbo.registry.address");
               if (address != null && address.length() > 0) {
                   registries = new ArrayList<RegistryConfig>();
                   String[] as = address.split("\\s*[|]+\\s*");
                   for (String a : as) {
                       RegistryConfig registryConfig = new RegistryConfig();
                       registryConfig.setAddress(a);
                       registries.add(registryConfig);
                   }
               }
           }
   ```
   
   but later, appendProperties is called so that the value from `dubbo.registry.address` will
override the address value from each RegistryConfig, for registryConfig1, its address becomes
from 'addr1' to 'addr1|addr2':
   
   ```java
           for (RegistryConfig registryConfig : registries) {
               appendProperties(registryConfig);
           }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message