-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
Optimize the selection of invokers in the multi-registry scenario #7446
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7446 +/- ##
============================================
+ Coverage 59.12% 59.29% +0.17%
- Complexity 456 503 +47
============================================
Files 1043 1076 +33
Lines 42516 43180 +664
Branches 6226 6293 +67
============================================
+ Hits 25136 25603 +467
- Misses 14593 14748 +155
- Partials 2787 2829 +42
Continue to review full report at Codecov.
|
@@ -369,19 +373,43 @@ private T createProxy(Map<String, String> map) { | |||
List<Invoker<?>> invokers = new ArrayList<Invoker<?>>(); | |||
URL registryURL = null; | |||
for (URL url : urls) { | |||
invokers.add(REF_PROTOCOL.refer(interfaceClass, url)); | |||
Invoker<?> referInvoker = REF_PROTOCOL.refer(interfaceClass, url); |
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 the provider didn't start first. Wait consumer start for a while, when provider start, the provider still be subscribe?
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 check=true, an error will be reported, otherwise it will be subscribed
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
Optimize the selection of invokers in the multi-registry scenario.
In the multi-registry scenario, if a service is not under a certain registry, the invoker can be filtered out in advance.
see more detail from #7444
Brief changelog
XXXXX
Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX
. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests=false
&mvn clean test-compile failsafe:integration-test
to make sure unit-test and integration-test pass.