-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
[ISSUE-#7722] Fix serviceNameMapping didn't work problem. #7723
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7723 +/- ##
=========================================
Coverage 59.18% 59.19%
+ Complexity 529 528 -1
=========================================
Files 1076 1076
Lines 43540 43529 -11
Branches 6363 6364 +1
=========================================
- Hits 25771 25765 -6
Misses 14903 14903
+ Partials 2866 2861 -5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem with SERVICE_REGISTRY_PROTOCOL.equals(url.getProtocol()), you are right.
@@ -216,7 +219,7 @@ public void exported() { | |||
exportedURLs.forEach(url -> { | |||
// dubbo2.7.x does not register serviceNameMapping information with the registry by default. | |||
// Only when the user manually turns on the service introspection, can he register with the registration center. | |||
boolean isServiceDiscovery = SERVICE_REGISTRY_PROTOCOL.equals(url.getProtocol()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem with SERVICE_REGISTRY_PROTOCOL.equals(url.getProtocol()), you are right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (SERVICE_REGISTRY_PROTOCOL.equals(registryURL.getProtocol())) {
url = url.addParameterIfAbsent(REGISTRY_TYPE_KEY, SERVICE_REGISTRY_TYPE);
}
Why do we need this paragraph of judgment? In the org.apache.dubbo.config.utils.ConfigValidationUtils#loadRegistries method, it has been converted to registryProtcol based on the registry-type parameter.
The url is different.
getExportedUrls return the url which didn't hold registry param. see: dubbo/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java Line 348 in 18c5b4c
|
i get it. you are right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What is the purpose of the change
For-#7722