zrlw opened a new issue #9014:
URL: https://github.com/apache/dubbo/issues/9014


   ### Environment
   
   * Dubbo version: 3.0 / master
   
3.0的RegistryManager以及master的AbstractRegistryFactory的getRegistries获取的Registry有重复,因为registries里面有的key不同但registry相同,比如这样:
   ```
   zookeeper://127.0.0.1:38936/org.apache.dubbo.registry.RegistryService=
   
zookeeper://127.0.0.1:38936/org.apache.dubbo.registry.RegistryService?application=provider-app&dubbo=2.0.2&environment=product&file.cache=false&interface=org.apache.dubbo.registry.RegistryService&pid=11272,
 
service-discovery-registry://127.0.0.1:38936/org.apache.dubbo.registry.RegistryService=
   
zookeeper://127.0.0.1:38936/org.apache.dubbo.registry.RegistryService?application=provider-app&dubbo=2.0.2&environment=product&file.cache=false&interface=org.apache.dubbo.registry.RegistryService&pid=11272
   ```
   重复的后果就是重复注册、解注册、destroy,然后抛异常,比如这样:
   ```
   [11/10/21 09:42:05:873 CST] main ERROR zookeeper.ZookeeperRegistry:  [DUBBO] 
Failed to unregister 
dubbo://192.168.1.23/org.apache.dubbo.config.api.DemoService?application=consumer-app&background=false&category=consumers&check=false&dubbo=2.0.2&environment=product&file.cache=false&injvm=false&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=callInnerClass,sayName,getUsers,echo,getBox,throwDemoException&pid=10228&release=&revision=2.0&side=consumer&sticky=false&timestamp=1633916525391&version=2.0,
 waiting for retry, cause: Failed to unregister 
dubbo://192.168.1.23/org.apache.dubbo.config.api.DemoService?application=consumer-app&background=false&category=consumers&check=false&dubbo=2.0.2&environment=product&file.cache=false&injvm=false&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=callInnerClass,sayName,getUsers,echo,getBox,throwDemoException&pid=10228&release=&revision=2.0&side=consumer&sticky=false&timestamp=16339165253
 91&version=2.0 to zookeeper 
zookeeper://127.0.0.1:36010/org.apache.dubbo.registry.RegistryService?application=consumer-app&dubbo=2.0.2&environment=product&file.cache=false&interface=org.apache.dubbo.registry.RegistryService&pid=10228,
 cause: Expected state [STARTED] was [STOPPED], dubbo version: , current host: 
192.168.1.23
   org.apache.dubbo.rpc.RpcException: Failed to unregister 
dubbo://192.168.1.23/org.apache.dubbo.config.api.DemoService?application=consumer-app&background=false&category=consumers&check=false&dubbo=2.0.2&environment=product&file.cache=false&injvm=false&interface=org.apache.dubbo.config.api.DemoService&metadata-type=remote&methods=callInnerClass,sayName,getUsers,echo,getBox,throwDemoException&pid=10228&release=&revision=2.0&side=consumer&sticky=false&timestamp=1633916525391&version=2.0
 to zookeeper 
zookeeper://127.0.0.1:36010/org.apache.dubbo.registry.RegistryService?application=consumer-app&dubbo=2.0.2&environment=product&file.cache=false&interface=org.apache.dubbo.registry.RegistryService&pid=10228,
 cause: Expected state [STARTED] was [STOPPED]
        at 
org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doUnregister(ZookeeperRegistry.java:136)
        at 
org.apache.dubbo.registry.support.FailbackRegistry.unregister(FailbackRegistry.java:254)
        at 
org.apache.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:488)
        at 
org.apache.dubbo.registry.support.FailbackRegistry.destroy(FailbackRegistry.java:408)
        at 
org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.destroy(ZookeeperRegistry.java:114)
        at 
org.apache.dubbo.registry.support.RegistryManager.destroyAll(RegistryManager.java:105)
   ```


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