zrlw edited a comment on issue #9014:
URL: https://github.com/apache/dubbo/issues/9014#issuecomment-939630669


   
应用同时作为provider和consumer时也有问题,比如DubboBootstrapMultiInstanceTest的testMultiModuleDeployAndReload测试方法最后providerBootstrap.destroy()解注册一次,consumerBootstrap.destroy()又解注册时就会抛异常,这个问题只改HashSet类型没有用,因为provider和consumer分别有一个RegistryManager,但是它们共享了一个zkClient,一个destroy了就直接把zkClient给关了,另一个unregistry就异常了。
   
   
我想把所有获取RegistryManager对象的代码改成:ApplicationModel.defaultModel().getBeanFactory().getBean(RegistryManager.class);
   测试了一下这样做能够解决这个二次注销的问题。
   RegistryManager区分applicationModel是为了什么?不区分貌似也不影响多实例吧?


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