Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

显示调用ReferenceConfig.destory()方法缺陷 #478

Closed
lemon2004122034 opened this issue Jul 20, 2017 · 4 comments
Closed

显示调用ReferenceConfig.destory()方法缺陷 #478

lemon2004122034 opened this issue Jul 20, 2017 · 4 comments
Labels
type/bug Bugs to being fixed

Comments

@lemon2004122034
Copy link

程序中需要显示的调用ReferenceConfig.destory()销毁consumer时,其对应的ChildListener并没有被删除,通过分析代码发现 zkClient.removeChildListener(toUrlPath(url), zkListener)导致。
原因是因为:toUrlPath(url) 返回的内容和订阅时注册的url不一致。
订阅时监听的url分别为 :
.../XXXSERVICE/providers;
.../XXXSERVICE/configurators;
.../XXXSERVICE/routers;
而取消订阅时URL为:
.../XXXService?application=xxx&category=providers,configurators,routers

故进而导致销毁的consumer并不会清除对应的ChildListener;

@chickenlj chickenlj added the type/bug Bugs to being fixed label Aug 23, 2017
@jerry8086
Copy link

我们在泛化引用销毁consumer时也碰到了这个问题, @chickenlj 想问下这个问题有具体修复计划吗?

@ralf0131
Copy link
Contributor

Hi, would you mind send a pull request?

solid210 pushed a commit to solid210/incubator-dubbo that referenced this issue Jul 29, 2018
1. Delete zk node when invoke ReferenceConfig.destory() which consumer uses ZookeeperRegistry.
2. Remove ConcurrentMap<NotifyListener, ChildListener> in zkListeners if the map is empty(release the memory).
@beiwei30
Copy link
Member

this issue should have been fixed by #1792

@beiwei30
Copy link
Member

I also verified generic invocation, it works too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

5 participants