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

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

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

wuwen5
Copy link
Contributor

@wuwen5 wuwen5 commented May 30, 2023

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:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist.
  • Run `mvn clean compile --batch-mode -DskipTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true to make sure basic checks pass.

Copy link
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sonarcloud
Copy link

sonarcloud bot commented Jun 13, 2023

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
Copy link
Contributor

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

@chickenlj chickenlj closed this Aug 25, 2023
@chickenlj chickenlj reopened this Aug 25, 2023
@chickenlj
Copy link
Contributor

#952

@chickenlj chickenlj merged commit 77683ba into apache:develop Aug 25, 2023
1 of 4 checks passed
@sonarcloud
Copy link

sonarcloud bot commented Aug 25, 2023

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

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 this pull request may close these issues.

2 participants