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

Optimize the selection of invokers in the multi-registry scenario #7446

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

xiaoheng1
Copy link
Contributor

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:

  • Make sure there is a GITHUB_issue field 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 [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. 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. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-io
Copy link

Codecov Report

Merging #7446 (8666bf7) into master (576b3ab) will increase coverage by 0.17%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
.../java/org/apache/dubbo/config/ReferenceConfig.java 65.40% <0.00%> (-4.80%) 0.00 <0.00> (ø)
...o/remoting/transport/ChannelHandlerDispatcher.java 60.00% <0.00%> (-10.00%) 0.00% <0.00%> (ø%)
...ient/metadata/store/RemoteMetadataServiceImpl.java 32.75% <0.00%> (-5.18%) 0.00% <0.00%> (ø%)
.../rpc/protocol/dubbo/LazyConnectExchangeClient.java 53.84% <0.00%> (-4.40%) 0.00% <0.00%> (ø%)
.../dubbo/remoting/transport/netty4/NettyChannel.java 61.38% <0.00%> (-2.98%) 0.00% <0.00%> (ø%)
...pache/dubbo/registry/support/AbstractRegistry.java 80.00% <0.00%> (-1.49%) 0.00% <0.00%> (ø%)
...pache/dubbo/remoting/telnet/codec/TelnetCodec.java 50.61% <0.00%> (-0.62%) 0.00% <0.00%> (ø%)
...apache/dubbo/common/extension/ExtensionLoader.java 78.07% <0.00%> (ø) 0.00% <0.00%> (ø%)
...ache/dubbo/common/compiler/support/ClassUtils.java 49.73% <0.00%> (ø) 0.00% <0.00%> (ø%)
... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 576b3ab...8666bf7. Read the comment docs.

@@ -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);
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

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

LGTM.

@AlbumenJ AlbumenJ merged commit 2881761 into apache:master Apr 1, 2021
AlbumenJ added a commit to AlbumenJ/dubbo that referenced this pull request May 28, 2021
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.

4 participants