Skip to content

to fix something wrong with MergeableClusterInvoker#7360

Merged
AlbumenJ merged 2 commits intoapache:masterfrom
zhangxin1932:master
Mar 11, 2021
Merged

to fix something wrong with MergeableClusterInvoker#7360
AlbumenJ merged 2 commits intoapache:masterfrom
zhangxin1932:master

Conversation

@zhangxin1932
Copy link
Copy Markdown

@zhangxin1932 zhangxin1932 commented Mar 10, 2021

What is the purpose of the change

to fix something wrong with MergeableClusterInvoker#7359

Brief changelog

As MergeableClusterInvoker was used, when 'resultList.size() == 1', there would be an error msg "AppResponse represents an concrete business response, there will be no status changes, you should get internal values directly." The reason is that the resultType would be "AppResponse", in org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster.InterceptorInvokerNode#invoke method's "return clause" the exception would be thrown.

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.

…he resultType of "resultList.iterator().next()" is AppResponse, which would throw an exception of UnsupportedOperationException
@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 10, 2021

Codecov Report

Merging #7360 (9420613) into master (a5859d1) will increase coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7360      +/-   ##
============================================
+ Coverage     58.67%   58.69%   +0.02%     
- Complexity      424      426       +2     
============================================
  Files          1044     1044              
  Lines         42488    42486       -2     
  Branches       6231     6230       -1     
============================================
+ Hits          24928    24939      +11     
+ Misses        14768    14753      -15     
- Partials       2792     2794       +2     
Impacted Files Coverage Δ Complexity Δ
...o/rpc/cluster/support/MergeableClusterInvoker.java 39.32% <0.00%> (ø) 0.00 <0.00> (ø)
.../remoting/transport/netty4/NettyServerHandler.java 61.36% <0.00%> (-9.10%) 0.00% <0.00%> (ø%)
.../apache/dubbo/remoting/transport/AbstractPeer.java 58.69% <0.00%> (-4.35%) 0.00% <0.00%> (ø%)
...e/dubbo/registry/integration/RegistryProtocol.java 58.49% <0.00%> (-2.84%) 0.00% <0.00%> (ø%)
...pache/dubbo/registry/support/FailbackRegistry.java 64.48% <0.00%> (-0.94%) 0.00% <0.00%> (ø%)
...he/dubbo/registry/multicast/MulticastRegistry.java 67.12% <0.00%> (-0.93%) 0.00% <0.00%> (ø%)
...n/java/org/apache/dubbo/common/utils/UrlUtils.java 73.92% <0.00%> (-0.34%) 0.00% <0.00%> (ø%)
...istry/client/DefaultRegistryClusterIdentifier.java 66.66% <0.00%> (ø) 0.00% <0.00%> (ø%)
...ry/client/metadata/MetadataServiceNameMapping.java 3.44% <0.00%> (+0.22%) 0.00% <0.00%> (ø%)
.../dubbo/registry/integration/RegistryDirectory.java 76.51% <0.00%> (+1.00%) 0.00% <0.00%> (ø%)
... and 10 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 a5859d1...9420613. Read the comment docs.

Copy link
Copy Markdown
Member

@horizonzy horizonzy left a comment

Choose a reason for hiding this comment

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

line_71 also follow this logic.

…he resultType of "resultList.iterator().next()" is AppResponse, which would throw an exception of UnsupportedOperationException
Copy link
Copy Markdown
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 a588723 into apache:master Mar 11, 2021
AlbumenJ added a commit to AlbumenJ/dubbo that referenced this pull request May 27, 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