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

Support consistent hash load balance when gerenic invoke #10799

Merged
merged 1 commit into from
Nov 6, 2022

Conversation

akaakking
Copy link
Contributor

What is the purpose of the change

Support consistent hash load balance when gerenic invoke

Brief changelog

For generalization calls, the toKey function in org.apache.dubbo.rpc.cluster.loadbalance.ConsistentHashLoadBalance has been changed

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

This PR will fix #10774

@codecov-commenter
Copy link

Codecov Report

Merging #10799 (5fd5711) into 3.1 (0976a0c) will decrease coverage by 2.49%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##                3.1   #10799      +/-   ##
============================================
- Coverage     67.06%   64.56%   -2.50%     
+ Complexity      520      468      -52     
============================================
  Files          1342     1336       -6     
  Lines         64627    56957    -7670     
  Branches      10808     8400    -2408     
============================================
- Hits          43341    36775    -6566     
+ Misses        17004    16228     -776     
+ Partials       4282     3954     -328     
Impacted Files Coverage Δ
...cluster/loadbalance/ConsistentHashLoadBalance.java 90.69% <50.00%> (-1.99%) ⬇️
...luster/router/script/ScriptStateRouterFactory.java 0.00% <0.00%> (-100.00%) ⬇️
...zookeeper/curator/CuratorZookeeperTransporter.java 0.00% <0.00%> (-100.00%) ⬇️
...pc/cluster/router/file/FileStateRouterFactory.java 0.00% <0.00%> (-80.96%) ⬇️
...o/rpc/cluster/router/script/ScriptStateRouter.java 0.00% <0.00%> (-46.67%) ⬇️
...ting/zookeeper/curator/CuratorZookeeperClient.java 15.38% <0.00%> (-38.65%) ⬇️
...dubbo/remoting/zookeeper/ZookeeperTransporter.java 50.00% <0.00%> (-33.34%) ⬇️
...pache/dubbo/common/function/ThrowableFunction.java 71.42% <0.00%> (-28.58%) ⬇️
.../remoting/api/SingleProtocolConnectionManager.java 61.53% <0.00%> (-23.08%) ⬇️
...nt/metadata/ServiceInstanceHostPortCustomizer.java 65.78% <0.00%> (-19.67%) ⬇️
... and 179 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

Please add some uts to verify this

@akaakking
Copy link
Contributor Author

Please add some uts to verify this

Do you mean that I have to do a test and construct a lot of invocations to see if load balancing is really achieved?

@AlbumenJ
Copy link
Member

AlbumenJ commented Nov 1, 2022

Please add some uts to verify this

Do you mean that I have to do a test and construct a lot of invocations to see if load balancing is really achieved?

It is enough to check that the parameters have been obtained correctly.

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.

3 participants