apache / dubbo-admin

The ops and reference implementation for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
4k stars 2.17k forks source link

Fix consumer refresh issue in instance registration cache. #1081

Closed wuwen5 closed 1 year ago

wuwen5 commented 1 year ago

What is the purpose of the change

When configuring metadataType=remote on the application side, there is no MetadataService service export, and the incorrect call of dubbo admin causes many exceptions on the application side.

java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected.

应用配置metadataType=remote的时候,dubbo-admin这里的MetadataService metadataService = MetadataUtils.referProxy(instance).getProxy(); 失败调用会对应用侧产生大量异常日志。 另外,不清楚这里定时刷新的作用是什么? 从代码上看仅仅只是触发了一次metadataService.getSubscribedURLs();调用,对subscribedCache也没有什么操作.

Brief changelog

Verifying this change

Follow this checklist to help us incorporate your contribution quickly and easily:

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 7 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 4 Security Hotspots
Code Smell A 185 Code Smells

No Coverage information No Coverage information
2.8% 2.8% Duplication