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

dubbo泛化调用完成时,调用reference.destroy()后,com.alibaba.dubbo.common.URL依然没有回收 #6676

Closed
robin977 opened this issue Sep 1, 2020 · 1 comment · Fixed by #6790

Comments

@robin977
Copy link
Contributor

robin977 commented Sep 1, 2020

测试场景:
public void run(String addr,String targetMethod,String className,String version) {
GenericService object=null;
ApplicationConfig applicationConfig=new ApplicationConfig("job-consumer-application");
RegistryConfig registryConfig=new RegistryConfig();
registryConfig.setAddress(addr);
registryConfig.setProtocol("zookeeper");
applicationConfig.setRegistry(registryConfig);
ReferenceConfig reference = new ReferenceConfig();
reference.setApplication(applicationConfig);
reference.setRegistry(registryConfig);
reference.setGeneric(true);
reference.setInterface(targetObject);
reference.setVersion(version);
reference.setCheck(false);
object=reference.get();
Object result=null;
try {
result= object.$invoke(targetMethod, parameterTypes, args);
} catch (Throwable e) {
e.printStackTrace();
}finally {
reference.destroy();
}
}
此方法调用后,com.alibaba.dubbo.common.URL依然没有回收
AbstractRegistry的ConcurrentMap<URL, Map<String, List>> notified,这个集合没有remove操作,所以它一直在涨
image

@manzhizhen
Copy link

let me see

manzhizhen added a commit to manzhizhen/dubbo that referenced this issue Sep 29, 2020
chickenlj pushed a commit that referenced this issue Oct 5, 2020
chickenlj pushed a commit to chickenlj/incubator-dubbo that referenced this issue Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants