apache / dubbo-admin

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

fix:Fix init of `ServiceMapping` when metadata center uses nacos. #1148

Closed wuwen5 closed 1 year ago

wuwen5 commented 1 year ago

What is the purpose of the change

当将Nacos用作注册中心和元数据中心时,并且元数据中心与注册中心的地址不相同时,会导致数据加载出现问题。

根据当前NacosServiceMapping的实现方式,它应该从注册中心的地址查询服务信息,而不是使用配置的元数据中心地址。

When Nacos is used as the registration center and metadata center, and the addresses of the metadata center and the registration center are different, it will cause problems in data loading.

According to the current implementation of NacosServiceMapping, it should query service information from the registry address instead of using the configured metadata center address.

Brief changelog

XX

Verifying this change

XXXX

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 A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

chickenlj commented 1 year ago

到底是使用注册中心地址还是元数据中心地址,应该是取决于应用侧的配置,如果应用侧配置了不同的元数据中心,则admin就应该从这个元数据中心读取数据。

chickenlj commented 1 year ago

https://github.com/apache/dubbo-admin/issues/952

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint