You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/25 06:38:59 UTC
[GitHub] [dubbo] laddcn opened a new pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
laddcn opened a new pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916
## What is the purpose of the change
Improve consistent hashing load balancing with a new algorithm which can resolve problems mentioned in https://github.com/apache/dubbo/issues/4103
## Brief changelog
A new algorithm "[Consistent Hashing with Bounded Loads](https://cn.bing.com/academic/profile?id=444fbd87cfcfb664f18caac119986420&encoded=0&v=paper_preview&mkt=zh-cn#)"introduced by Vahab Mirrokni (work at Google Research) in 2018 can resolve this problem.
Brief introduction quoted from a blog which use this new algorithm and works well (https://medium.com/vimeo-engineering-blog/improving-load-balancing-with-a-new-consistent-hashing-algorithm-9f1bd75709ed):
Here is a simplified sketch of the algorithm. Some details are left out, and if you intend to implement it yourself, you should definitely go to the original paper for information.
First, define a balancing factor, c, which is greater than 1. c controls how much imbalance is allowed between the servers. For example, if c = 1.25, no server should get more than 125% of the average load. In the limit as c increases to ∞, the algorithm becomes equivalent to plain consistent hashing, without balancing; as c decreases to near 1 it becomes more like a least-connection policy and the hash becomes less important. In my experience, values between 1.25 and 2 are good for practical use.
When a request arrives, compute the average load (the number of outstanding requests, m, including the one that just arrived, divided by the number of available servers, n). Multiply the average load by c to get a “target load”, t. In the original paper, capacities are assigned to servers so that each server gets a capacity of either ⌊t⌋ or ⌈t⌉, and the total capacity is ⌈cm⌉. Therefore the maximum capacity of a server is ⌈cm/n⌉, which is greater than c times the average load by less than 1 request. To support giving servers different “weights”, as HAProxy does, the algorithm has to change slightly, but the spirit is the same — no server can exceed its fair share of the load by more than 1 request.
To dispatch a request, compute its hash and the nearest server, as usual. If that server is below its capacity, then assign the request to that server. Otherwise, go to the next server in the hash ring and check its capacity, continuing until you find a server that has capacity remaining. There has to be one, since the highest capacity is above the average load, and it’s impossible for every server’s load to be above average. This guarantees some nice things:
No server is allowed to get overloaded by more than a factor of c plus 1 request.
The distribution of requests is the same as consistent hashing as long as servers aren’t overloaded.
If a server is overloaded, the list of fallback servers chosen will be the same for the same request hash — i.e. the same server will consistently be the “second choice” for a popular piece of content. This is good for caching.
If a server is overloaded, the list of fallback servers will usually be different for different request hashes — i.e. the overloaded server’s spillover load will be distributed among the available servers, instead of all landing on a single server. This depends on each server being assigned multiple points in the consistent hash ring.
## Verifying this change
Test cases work well
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/dubbo/issues) 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.
- [x] 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.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] 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](https://github.com/apache/dubbo-samples) project.
- [x] 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](https://github.com/apache/dubbo/wiki/Software-donation-guide).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6da82f) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **decrease** coverage by `0.66%`.
> The diff coverage is `90.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
- Coverage 60.76% 60.09% -0.67%
+ Complexity 446 445 -1
============================================
Files 1100 1100
Lines 44428 44453 +25
Branches 6471 6473 +2
============================================
- Hits 26997 26716 -281
- Misses 14459 14761 +302
- Partials 2972 2976 +4
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.66% <90.00%> (-1.02%)` | :arrow_down: |
| [...ookeeper/ZookeeperDynamicConfigurationFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-63.34%)` | :arrow_down: |
| [...pport/zookeeper/ZookeeperDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (-60.00%)` | :arrow_down: |
| [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `31.42% <0.00%> (-54.29%)` | :arrow_down: |
| [.../dubbo/metadata/report/MetadataReportInstance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvTWV0YWRhdGFSZXBvcnRJbnN0YW5jZS5qYXZh) | `12.50% <0.00%> (-40.63%)` | :arrow_down: |
| [.../configcenter/support/zookeeper/CacheListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9DYWNoZUxpc3RlbmVyLmphdmE=) | `0.00% <0.00%> (-32.44%)` | :arrow_down: |
| [...gistry/client/migration/MigrationRuleListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvblJ1bGVMaXN0ZW5lci5qYXZh) | `55.88% <0.00%> (-23.53%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-20.69%)` | :arrow_down: |
| [...mmon/config/configcenter/DynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9EeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `68.18% <0.00%> (-18.19%)` | :arrow_down: |
| ... and [58 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...f6da82f](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-929036431
Cloud you please patch this to 3.0 branch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] changfubai commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
changfubai commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717169435
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Review comment:
change to AtomicInteger to prevent concurrent problem?
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
Review comment:
why not invoke method `getNextInvokerNode`?
##########
File path: dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java
##########
@@ -18,55 +18,55 @@
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.cluster.LoadBalance;
import org.apache.dubbo.rpc.cluster.RouterChain;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
@SuppressWarnings("rawtypes")
public class ConsistentHashLoadBalanceTest extends LoadBalanceBaseTest {
+ /**
+ * Test case for hot key
+ * https://github.com/apache/dubbo/issues/4103
+ * invoke method with same params for 10000 times:
+ * 1. count of request accept by each invoker will not
+ * be higher than (overloadRatioAllowed * average + 1)
+ *
+ */
@Test
public void testConsistentHashLoadBalance() {
int runs = 10000;
- long unHitedInvokerCount = 0;
- Map<Invoker, Long> hitedInvokers = new HashMap<>();
Map<Invoker, AtomicLong> counter = getInvokeCounter(runs, ConsistentHashLoadBalance.NAME);
- for (Invoker minvoker : counter.keySet()) {
- Long count = counter.get(minvoker).get();
-
- if (count == 0) {
- unHitedInvokerCount++;
- } else {
- hitedInvokers.put(minvoker, count);
- }
+ double overloadRatioAllowed = 1.5F;
+ int serverCount = counter.size();
+ double overloadThread = ((double) runs * overloadRatioAllowed)/((double) serverCount);
+ for (Invoker invoker : counter.keySet()) {
+ Long count = counter.get(invoker).get();
+ Assertions.assertTrue(count < (overloadThread + 1L),
Review comment:
这里为啥不是小于overloadThread呢?
##########
File path: dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java
##########
@@ -18,55 +18,55 @@
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.cluster.LoadBalance;
import org.apache.dubbo.rpc.cluster.RouterChain;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
@SuppressWarnings("rawtypes")
public class ConsistentHashLoadBalanceTest extends LoadBalanceBaseTest {
+ /**
+ * Test case for hot key
+ * https://github.com/apache/dubbo/issues/4103
+ * invoke method with same params for 10000 times:
+ * 1. count of request accept by each invoker will not
+ * be higher than (overloadRatioAllowed * average + 1)
+ *
+ */
@Test
public void testConsistentHashLoadBalance() {
int runs = 10000;
- long unHitedInvokerCount = 0;
- Map<Invoker, Long> hitedInvokers = new HashMap<>();
Map<Invoker, AtomicLong> counter = getInvokeCounter(runs, ConsistentHashLoadBalance.NAME);
- for (Invoker minvoker : counter.keySet()) {
- Long count = counter.get(minvoker).get();
-
- if (count == 0) {
- unHitedInvokerCount++;
- } else {
- hitedInvokers.put(minvoker, count);
- }
+ double overloadRatioAllowed = 1.5F;
+ int serverCount = counter.size();
+ double overloadThread = ((double) runs * overloadRatioAllowed)/((double) serverCount);
+ for (Invoker invoker : counter.keySet()) {
+ Long count = counter.get(invoker).get();
+ Assertions.assertTrue(count < (overloadThread + 1L),
Review comment:
这里为啥不是小于overloadThread呢?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] zhongxiongzeng commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
zhongxiongzeng commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927585173
> > > > maybe next entry overload ,hahhhhh
> > >
> > >
> > > No server can exceed its fair share of the load by more than 1 request
> >
> >
> > i got it . so if all the nodes are overload, they will loop all the time ?
>
> There has to be one, since the highest capacity is above the average load, and it’s impossible for every server’s load to be above average.
nice work, thanks for your answer, i hava one last question, could overloadThread or sever request count be negative?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6da82f) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **decrease** coverage by `0.01%`.
> The diff coverage is `90.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
- Coverage 60.76% 60.75% -0.02%
Complexity 446 446
============================================
Files 1100 1100
Lines 44428 44453 +25
Branches 6471 6473 +2
============================================
+ Hits 26997 27006 +9
Misses 14459 14459
- Partials 2972 2988 +16
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.66% <90.00%> (-1.02%)` | :arrow_down: |
| [.../dubbo/remoting/transport/MultiMessageHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvTXVsdGlNZXNzYWdlSGFuZGxlci5qYXZh) | `66.66% <0.00%> (-13.34%)` | :arrow_down: |
| [...ting/exchange/support/header/HeartbeatHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L2hlYWRlci9IZWFydGJlYXRIYW5kbGVyLmphdmE=) | `83.72% <0.00%> (-9.31%)` | :arrow_down: |
| [...ng/exchange/support/header/HeartbeatTimerTask.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L2hlYWRlci9IZWFydGJlYXRUaW1lclRhc2suamF2YQ==) | `68.42% <0.00%> (-5.27%)` | :arrow_down: |
| [...pport/merger/DefaultProviderURLMergeProcessor.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9tZXJnZXIvRGVmYXVsdFByb3ZpZGVyVVJMTWVyZ2VQcm9jZXNzb3IuamF2YQ==) | `78.26% <0.00%> (-4.35%)` | :arrow_down: |
| [.../main/java/org/apache/dubbo/qos/server/Server.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9TZXJ2ZXIuamF2YQ==) | `75.00% <0.00%> (-4.17%)` | :arrow_down: |
| [...port/identifier/BaseServiceMetadataIdentifier.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvaWRlbnRpZmllci9CYXNlU2VydmljZU1ldGFkYXRhSWRlbnRpZmllci5qYXZh) | `53.57% <0.00%> (-3.58%)` | :arrow_down: |
| [...e/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNoYW5uZWwuamF2YQ==) | `52.27% <0.00%> (-3.41%)` | :arrow_down: |
| [...etadata/report/support/AbstractMetadataReport.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvc3VwcG9ydC9BYnN0cmFjdE1ldGFkYXRhUmVwb3J0LmphdmE=) | `56.31% <0.00%> (-3.40%)` | :arrow_down: |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `83.05% <0.00%> (-3.39%)` | :arrow_down: |
| ... and [27 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...f6da82f](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6da82f) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **decrease** coverage by `0.71%`.
> The diff coverage is `90.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
- Coverage 60.76% 60.04% -0.72%
+ Complexity 446 444 -2
============================================
Files 1100 1100
Lines 44428 44406 -22
Branches 6471 6441 -30
============================================
- Hits 26997 26664 -333
- Misses 14459 14770 +311
Partials 2972 2972
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.66% <90.00%> (-1.02%)` | :arrow_down: |
| [...ookeeper/ZookeeperDynamicConfigurationFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-63.34%)` | :arrow_down: |
| [...pport/zookeeper/ZookeeperDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (-60.00%)` | :arrow_down: |
| [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `31.42% <0.00%> (-54.29%)` | :arrow_down: |
| [.../dubbo/metadata/report/MetadataReportInstance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvTWV0YWRhdGFSZXBvcnRJbnN0YW5jZS5qYXZh) | `12.50% <0.00%> (-40.63%)` | :arrow_down: |
| [.../configcenter/support/zookeeper/CacheListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9DYWNoZUxpc3RlbmVyLmphdmE=) | `0.00% <0.00%> (-32.44%)` | :arrow_down: |
| [...gistry/client/migration/MigrationRuleListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvblJ1bGVMaXN0ZW5lci5qYXZh) | `55.88% <0.00%> (-23.53%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-20.69%)` | :arrow_down: |
| [...mmon/config/configcenter/DynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9EeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `68.18% <0.00%> (-18.19%)` | :arrow_down: |
| ... and [74 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...f6da82f](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cca5b5d) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **increase** coverage by `0.01%`.
> The diff coverage is `73.91%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
+ Coverage 60.76% 60.78% +0.01%
Complexity 446 446
============================================
Files 1100 1100
Lines 44428 44450 +22
Branches 6471 6476 +5
============================================
+ Hits 26997 27018 +21
+ Misses 14459 14450 -9
- Partials 2972 2982 +10
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `85.71% <73.91%> (-6.97%)` | :arrow_down: |
| [...pport/merger/DefaultProviderURLMergeProcessor.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9tZXJnZXIvRGVmYXVsdFByb3ZpZGVyVVJMTWVyZ2VQcm9jZXNzb3IuamF2YQ==) | `78.26% <0.00%> (-4.35%)` | :arrow_down: |
| [.../main/java/org/apache/dubbo/qos/server/Server.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9TZXJ2ZXIuamF2YQ==) | `75.00% <0.00%> (-4.17%)` | :arrow_down: |
| [...port/identifier/BaseServiceMetadataIdentifier.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvaWRlbnRpZmllci9CYXNlU2VydmljZU1ldGFkYXRhSWRlbnRpZmllci5qYXZh) | `53.57% <0.00%> (-3.58%)` | :arrow_down: |
| [...e/dubbo/registry/integration/DynamicDirectory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9EeW5hbWljRGlyZWN0b3J5LmphdmE=) | `64.35% <0.00%> (-2.98%)` | :arrow_down: |
| [...ubbo/registry/support/AbstractRegistryFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnlGYWN0b3J5LmphdmE=) | `77.46% <0.00%> (-2.82%)` | :arrow_down: |
| [...bo/registry/client/migration/MigrationInvoker.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvbkludm9rZXIuamF2YQ==) | `21.89% <0.00%> (-1.19%)` | :arrow_down: |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `79.62% <0.00%> (-0.75%)` | :arrow_down: |
| [...g/apache/dubbo/registry/consul/ConsulRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktY29uc3VsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jb25zdWwvQ29uc3VsUmVnaXN0cnkuamF2YQ==) | `60.00% <0.00%> (-0.59%)` | :arrow_down: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `69.95% <0.00%> (-0.50%)` | :arrow_down: |
| ... and [8 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...cca5b5d](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927484450
> maybe next entry overload ,hahhhhh
No server can exceed its fair share of the load by more than 1 request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] zhongxiongzeng commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
zhongxiongzeng commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927504414
> > maybe next entry overload ,hahhhhh
>
> No server can exceed its fair share of the load by more than 1 request.
i got it . so if all the nodes are overload, they will loop all the time ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] zhongxiongzeng commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
zhongxiongzeng commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927281421
maybe next entry overload ,hahhhhh
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717192145
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -72,6 +84,28 @@
private final int[] argumentIndex;
+ /**
+ * key: server(invoker) address
+ * value: count of requests accept by certain server
+ */
+ private Map<String, Long> serverRequestCountMap = new HashMap<>();
Review comment:
I have resolved this problem.
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
+ }
+ serverAddress = entry.getValue().getUrl().getAddress();
+ }
+
+ if (!serverRequestCountMap.containsKey(serverAddress)) {
+ //
+ serverRequestCountMap.put(serverAddress, 1L);
+ } else {
+ serverRequestCountMap.put(serverAddress, serverRequestCountMap.get(entry.getValue().getUrl().getAddress()) + 1L);
Review comment:
I have resolved this problem.
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Review comment:
Thank you for review. I have resolved this problem yet.
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
Review comment:
This problem is also resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2018b3d) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **decrease** coverage by `0.76%`.
> The diff coverage is `88.88%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
- Coverage 60.76% 60.00% -0.77%
+ Complexity 446 445 -1
============================================
Files 1100 1100
Lines 44428 44451 +23
Branches 6471 6455 -16
============================================
- Hits 26997 26673 -324
- Misses 14459 14805 +346
- Partials 2972 2973 +1
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.37% <88.88%> (-1.31%)` | :arrow_down: |
| [...ookeeper/ZookeeperDynamicConfigurationFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-63.34%)` | :arrow_down: |
| [...pport/zookeeper/ZookeeperDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (-60.00%)` | :arrow_down: |
| [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `31.42% <0.00%> (-54.29%)` | :arrow_down: |
| [.../dubbo/metadata/report/MetadataReportInstance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvTWV0YWRhdGFSZXBvcnRJbnN0YW5jZS5qYXZh) | `12.50% <0.00%> (-40.63%)` | :arrow_down: |
| [.../configcenter/support/zookeeper/CacheListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9DYWNoZUxpc3RlbmVyLmphdmE=) | `0.00% <0.00%> (-32.44%)` | :arrow_down: |
| [...ntext/event/AwaitingNonWebApplicationListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tc3ByaW5nLWJvb3QvZHViYm8tc3ByaW5nLWJvb3QtY29tcGF0aWJsZS9hdXRvY29uZmlndXJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9zcHJpbmcvYm9vdC9jb250ZXh0L2V2ZW50L0F3YWl0aW5nTm9uV2ViQXBwbGljYXRpb25MaXN0ZW5lci5qYXZh) | `48.48% <0.00%> (-24.25%)` | :arrow_down: |
| [...gistry/client/migration/MigrationRuleListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvblJ1bGVMaXN0ZW5lci5qYXZh) | `55.88% <0.00%> (-23.53%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-20.69%)` | :arrow_down: |
| ... and [60 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...2018b3d](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2018b3d) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **decrease** coverage by `0.69%`.
> The diff coverage is `88.88%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
- Coverage 60.76% 60.07% -0.70%
- Complexity 446 447 +1
============================================
Files 1100 1100
Lines 44428 44451 +23
Branches 6471 6473 +2
============================================
- Hits 26997 26703 -294
- Misses 14459 14780 +321
+ Partials 2972 2968 -4
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.37% <88.88%> (-1.31%)` | :arrow_down: |
| [...ookeeper/ZookeeperDynamicConfigurationFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbkZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (-63.34%)` | :arrow_down: |
| [...pport/zookeeper/ZookeeperDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9ab29rZWVwZXJEeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (-60.00%)` | :arrow_down: |
| [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `31.42% <0.00%> (-54.29%)` | :arrow_down: |
| [.../dubbo/metadata/report/MetadataReportInstance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvTWV0YWRhdGFSZXBvcnRJbnN0YW5jZS5qYXZh) | `12.50% <0.00%> (-40.63%)` | :arrow_down: |
| [.../configcenter/support/zookeeper/CacheListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnY2VudGVyL2R1YmJvLWNvbmZpZ2NlbnRlci16b29rZWVwZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZ2NlbnRlci9zdXBwb3J0L3pvb2tlZXBlci9DYWNoZUxpc3RlbmVyLmphdmE=) | `0.00% <0.00%> (-32.44%)` | :arrow_down: |
| [...gistry/client/migration/MigrationRuleListener.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvblJ1bGVMaXN0ZW5lci5qYXZh) | `55.88% <0.00%> (-23.53%)` | :arrow_down: |
| [...ng/transport/dispatcher/all/AllChannelHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvZGlzcGF0Y2hlci9hbGwvQWxsQ2hhbm5lbEhhbmRsZXIuamF2YQ==) | `62.06% <0.00%> (-20.69%)` | :arrow_down: |
| [...mmon/config/configcenter/DynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9EeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `68.18% <0.00%> (-18.19%)` | :arrow_down: |
| ... and [54 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...2018b3d](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6da82f) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **increase** coverage by `0.01%`.
> The diff coverage is `90.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
+ Coverage 60.76% 60.78% +0.01%
Complexity 446 446
============================================
Files 1100 1100
Lines 44428 44453 +25
Branches 6471 6473 +2
============================================
+ Hits 26997 27021 +24
+ Misses 14459 14450 -9
- Partials 2972 2982 +10
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.66% <90.00%> (-1.02%)` | :arrow_down: |
| [.../dubbo/remoting/transport/MultiMessageHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvTXVsdGlNZXNzYWdlSGFuZGxlci5qYXZh) | `66.66% <0.00%> (-13.34%)` | :arrow_down: |
| [...ting/exchange/support/header/HeartbeatHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L2hlYWRlci9IZWFydGJlYXRIYW5kbGVyLmphdmE=) | `83.72% <0.00%> (-9.31%)` | :arrow_down: |
| [...pport/merger/DefaultProviderURLMergeProcessor.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9tZXJnZXIvRGVmYXVsdFByb3ZpZGVyVVJMTWVyZ2VQcm9jZXNzb3IuamF2YQ==) | `78.26% <0.00%> (-4.35%)` | :arrow_down: |
| [.../main/java/org/apache/dubbo/qos/server/Server.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9TZXJ2ZXIuamF2YQ==) | `75.00% <0.00%> (-4.17%)` | :arrow_down: |
| [...e/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNoYW5uZWwuamF2YQ==) | `52.27% <0.00%> (-3.41%)` | :arrow_down: |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `83.05% <0.00%> (-3.39%)` | :arrow_down: |
| [...e/dubbo/registry/integration/DynamicDirectory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9EeW5hbWljRGlyZWN0b3J5LmphdmE=) | `64.35% <0.00%> (-2.98%)` | :arrow_down: |
| [...ubbo/registry/support/AbstractRegistryFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnlGYWN0b3J5LmphdmE=) | `77.46% <0.00%> (-2.82%)` | :arrow_down: |
| [...e/dubbo/remoting/exchange/codec/ExchangeCodec.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9jb2RlYy9FeGNoYW5nZUNvZGVjLmphdmE=) | `77.64% <0.00%> (-2.44%)` | :arrow_down: |
| ... and [25 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...f6da82f](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ merged pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
AlbumenJ merged pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927559168
> > > maybe next entry overload ,hahhhhh
> >
> >
> > No server can exceed its fair share of the load by more than 1 request.
>
> i got it . so if all the nodes are overload, they will loop all the time ?
There has to be one, since the highest capacity is above the average load, and it’s impossible for every server’s load to be above average.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2018b3d) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **decrease** coverage by `0.02%`.
> The diff coverage is `88.88%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
- Coverage 60.76% 60.73% -0.03%
- Complexity 446 448 +2
============================================
Files 1100 1100
Lines 44428 44451 +23
Branches 6471 6473 +2
============================================
+ Hits 26997 26999 +2
- Misses 14459 14473 +14
- Partials 2972 2979 +7
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.37% <88.88%> (-1.31%)` | :arrow_down: |
| [.../dubbo/remoting/transport/MultiMessageHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvTXVsdGlNZXNzYWdlSGFuZGxlci5qYXZh) | `66.66% <0.00%> (-13.34%)` | :arrow_down: |
| [...ting/exchange/support/header/HeartbeatHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L2hlYWRlci9IZWFydGJlYXRIYW5kbGVyLmphdmE=) | `83.72% <0.00%> (-9.31%)` | :arrow_down: |
| [...pport/merger/DefaultProviderURLMergeProcessor.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9tZXJnZXIvRGVmYXVsdFByb3ZpZGVyVVJMTWVyZ2VQcm9jZXNzb3IuamF2YQ==) | `78.26% <0.00%> (-4.35%)` | :arrow_down: |
| [.../main/java/org/apache/dubbo/qos/server/Server.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9TZXJ2ZXIuamF2YQ==) | `75.00% <0.00%> (-4.17%)` | :arrow_down: |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `76.66% <0.00%> (-3.71%)` | :arrow_down: |
| [...port/identifier/BaseServiceMetadataIdentifier.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvaWRlbnRpZmllci9CYXNlU2VydmljZU1ldGFkYXRhSWRlbnRpZmllci5qYXZh) | `53.57% <0.00%> (-3.58%)` | :arrow_down: |
| [...etadata/report/support/AbstractMetadataReport.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvc3VwcG9ydC9BYnN0cmFjdE1ldGFkYXRhUmVwb3J0LmphdmE=) | `56.31% <0.00%> (-3.40%)` | :arrow_down: |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `83.05% <0.00%> (-3.39%)` | :arrow_down: |
| [...e/dubbo/registry/integration/DynamicDirectory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9EeW5hbWljRGlyZWN0b3J5LmphdmE=) | `64.35% <0.00%> (-2.98%)` | :arrow_down: |
| ... and [24 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...2018b3d](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717234779
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Review comment:
Thank you for review. I have resolved this problem yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] changfubai commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
changfubai commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717169435
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Review comment:
change to AtomicInteger to prevent concurrent problem?
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
Review comment:
why not invoke method `getNextInvokerNode`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717192145
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -72,6 +84,28 @@
private final int[] argumentIndex;
+ /**
+ * key: server(invoker) address
+ * value: count of requests accept by certain server
+ */
+ private Map<String, Long> serverRequestCountMap = new HashMap<>();
Review comment:
I have resolved this problem.
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
+ }
+ serverAddress = entry.getValue().getUrl().getAddress();
+ }
+
+ if (!serverRequestCountMap.containsKey(serverAddress)) {
+ //
+ serverRequestCountMap.put(serverAddress, 1L);
+ } else {
+ serverRequestCountMap.put(serverAddress, serverRequestCountMap.get(entry.getValue().getUrl().getAddress()) + 1L);
Review comment:
I have resolved this problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-929755909
> Cloud you please patch this to 3.0 branch?
I have created a new pr for 3.0 branch. https://github.com/apache/dubbo/pull/8948
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cca5b5d) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **increase** coverage by `0.02%`.
> The diff coverage is `73.91%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
+ Coverage 60.76% 60.78% +0.02%
Complexity 446 446
============================================
Files 1100 1100
Lines 44428 44450 +22
Branches 6471 6476 +5
============================================
+ Hits 26997 27020 +23
+ Misses 14459 14450 -9
- Partials 2972 2980 +8
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `85.71% <73.91%> (-6.97%)` | :arrow_down: |
| [...pport/merger/DefaultProviderURLMergeProcessor.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9tZXJnZXIvRGVmYXVsdFByb3ZpZGVyVVJMTWVyZ2VQcm9jZXNzb3IuamF2YQ==) | `78.26% <0.00%> (-4.35%)` | :arrow_down: |
| [.../main/java/org/apache/dubbo/qos/server/Server.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9TZXJ2ZXIuamF2YQ==) | `75.00% <0.00%> (-4.17%)` | :arrow_down: |
| [...e/dubbo/registry/integration/DynamicDirectory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9EeW5hbWljRGlyZWN0b3J5LmphdmE=) | `64.35% <0.00%> (-2.98%)` | :arrow_down: |
| [...ubbo/registry/support/AbstractRegistryFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnlGYWN0b3J5LmphdmE=) | `77.46% <0.00%> (-2.82%)` | :arrow_down: |
| [...bo/registry/client/migration/MigrationInvoker.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvbWlncmF0aW9uL01pZ3JhdGlvbkludm9rZXIuamF2YQ==) | `21.89% <0.00%> (-1.19%)` | :arrow_down: |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `79.62% <0.00%> (-0.75%)` | :arrow_down: |
| [...g/apache/dubbo/registry/consul/ConsulRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktY29uc3VsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jb25zdWwvQ29uc3VsUmVnaXN0cnkuamF2YQ==) | `60.00% <0.00%> (-0.59%)` | :arrow_down: |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `69.95% <0.00%> (-0.50%)` | :arrow_down: |
| [...apache/dubbo/common/extension/ExtensionLoader.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vZXh0ZW5zaW9uL0V4dGVuc2lvbkxvYWRlci5qYXZh) | `81.10% <0.00%> (+0.21%)` | :arrow_up: |
| ... and [6 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...cca5b5d](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-929036431
Cloud you please patch this to 3.0 branch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717235007
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
Review comment:
This problem is also resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] laddcn commented on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
laddcn commented on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-929755909
> Cloud you please patch this to 3.0 branch?
I have created a new pr for 3.0 branch. https://github.com/apache/dubbo/pull/8948
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] changfubai commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
changfubai commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717199062
##########
File path: dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java
##########
@@ -18,55 +18,55 @@
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.cluster.LoadBalance;
import org.apache.dubbo.rpc.cluster.RouterChain;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
@SuppressWarnings("rawtypes")
public class ConsistentHashLoadBalanceTest extends LoadBalanceBaseTest {
+ /**
+ * Test case for hot key
+ * https://github.com/apache/dubbo/issues/4103
+ * invoke method with same params for 10000 times:
+ * 1. count of request accept by each invoker will not
+ * be higher than (overloadRatioAllowed * average + 1)
+ *
+ */
@Test
public void testConsistentHashLoadBalance() {
int runs = 10000;
- long unHitedInvokerCount = 0;
- Map<Invoker, Long> hitedInvokers = new HashMap<>();
Map<Invoker, AtomicLong> counter = getInvokeCounter(runs, ConsistentHashLoadBalance.NAME);
- for (Invoker minvoker : counter.keySet()) {
- Long count = counter.get(minvoker).get();
-
- if (count == 0) {
- unHitedInvokerCount++;
- } else {
- hitedInvokers.put(minvoker, count);
- }
+ double overloadRatioAllowed = 1.5F;
+ int serverCount = counter.size();
+ double overloadThread = ((double) runs * overloadRatioAllowed)/((double) serverCount);
+ for (Invoker invoker : counter.keySet()) {
+ Long count = counter.get(invoker).get();
+ Assertions.assertTrue(count < (overloadThread + 1L),
Review comment:
这里为啥不是小于overloadThread呢?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r716620179
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -111,13 +149,49 @@ private String toKey(Object[] args) {
}
private Invoker<T> selectForKey(long hash) {
+ ++totalRequestCount;
Map.Entry<Long, Invoker<T>> entry = virtualInvokers.ceilingEntry(hash);
if (entry == null) {
entry = virtualInvokers.firstEntry();
}
+ String serverAddress = entry.getValue().getUrl().getAddress();
+ double overloadThread = ((double) totalRequestCount / (double) serverCount) * overloadRatioAllowed;
+
+ /**
+ * Find a valid server node:
+ * 1. Not have accept request yet
+ * or
+ * 2. Not have overloaded (request count already accept < thread (average request count * overloadRatioAllowed ))
+ */
+ while (serverRequestCountMap.containsKey(serverAddress)
+ && serverRequestCountMap.get(serverAddress) >= overloadThread) {
+ /**
+ * If server node is not valid, get next node
+ */
+ entry = virtualInvokers.higherEntry(entry.getKey());
+ if(entry == null){
+ entry = virtualInvokers.firstEntry();
+ }
+ serverAddress = entry.getValue().getUrl().getAddress();
+ }
+
+ if (!serverRequestCountMap.containsKey(serverAddress)) {
+ //
+ serverRequestCountMap.put(serverAddress, 1L);
+ } else {
+ serverRequestCountMap.put(serverAddress, serverRequestCountMap.get(entry.getValue().getUrl().getAddress()) + 1L);
Review comment:
Use ActomicLong.increase to prevent concurrent problem
##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java
##########
@@ -72,6 +84,28 @@
private final int[] argumentIndex;
+ /**
+ * key: server(invoker) address
+ * value: count of requests accept by certain server
+ */
+ private Map<String, Long> serverRequestCountMap = new HashMap<>();
Review comment:
Change to ConcurrentHashMap to prevent concurrent problem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] codecov-commenter edited a comment on pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#issuecomment-927039553
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8916](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2018b3d) into [master](https://codecov.io/gh/apache/dubbo/commit/db175899d73966f52bbd1a9043503ca749a107e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db17589) will **increase** coverage by `0.01%`.
> The diff coverage is `88.88%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/8916/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #8916 +/- ##
============================================
+ Coverage 60.76% 60.77% +0.01%
- Complexity 446 448 +2
============================================
Files 1100 1100
Lines 44428 44451 +23
Branches 6471 6473 +2
============================================
+ Hits 26997 27016 +19
+ Misses 14459 14456 -3
- Partials 2972 2979 +7
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...cluster/loadbalance/ConsistentHashLoadBalance.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `91.37% <88.88%> (-1.31%)` | :arrow_down: |
| [.../dubbo/remoting/transport/MultiMessageHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvTXVsdGlNZXNzYWdlSGFuZGxlci5qYXZh) | `66.66% <0.00%> (-13.34%)` | :arrow_down: |
| [...ting/exchange/support/header/HeartbeatHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L2hlYWRlci9IZWFydGJlYXRIYW5kbGVyLmphdmE=) | `83.72% <0.00%> (-9.31%)` | :arrow_down: |
| [...pport/merger/DefaultProviderURLMergeProcessor.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9tZXJnZXIvRGVmYXVsdFByb3ZpZGVyVVJMTWVyZ2VQcm9jZXNzb3IuamF2YQ==) | `78.26% <0.00%> (-4.35%)` | :arrow_down: |
| [.../main/java/org/apache/dubbo/qos/server/Server.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9TZXJ2ZXIuamF2YQ==) | `75.00% <0.00%> (-4.17%)` | :arrow_down: |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `83.05% <0.00%> (-3.39%)` | :arrow_down: |
| [...e/dubbo/registry/integration/DynamicDirectory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9EeW5hbWljRGlyZWN0b3J5LmphdmE=) | `64.35% <0.00%> (-2.98%)` | :arrow_down: |
| [...ubbo/registry/support/AbstractRegistryFactory.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnlGYWN0b3J5LmphdmE=) | `77.46% <0.00%> (-2.82%)` | :arrow_down: |
| [...e/dubbo/remoting/exchange/codec/ExchangeCodec.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9jb2RlYy9FeGNoYW5nZUNvZGVjLmphdmE=) | `77.64% <0.00%> (-2.44%)` | :arrow_down: |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `78.14% <0.00%> (-2.23%)` | :arrow_down: |
| ... and [22 more](https://codecov.io/gh/apache/dubbo/pull/8916/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [db17589...2018b3d](https://codecov.io/gh/apache/dubbo/pull/8916?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] changfubai commented on a change in pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
changfubai commented on a change in pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916#discussion_r717199062
##########
File path: dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java
##########
@@ -18,55 +18,55 @@
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.cluster.LoadBalance;
import org.apache.dubbo.rpc.cluster.RouterChain;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
@SuppressWarnings("rawtypes")
public class ConsistentHashLoadBalanceTest extends LoadBalanceBaseTest {
+ /**
+ * Test case for hot key
+ * https://github.com/apache/dubbo/issues/4103
+ * invoke method with same params for 10000 times:
+ * 1. count of request accept by each invoker will not
+ * be higher than (overloadRatioAllowed * average + 1)
+ *
+ */
@Test
public void testConsistentHashLoadBalance() {
int runs = 10000;
- long unHitedInvokerCount = 0;
- Map<Invoker, Long> hitedInvokers = new HashMap<>();
Map<Invoker, AtomicLong> counter = getInvokeCounter(runs, ConsistentHashLoadBalance.NAME);
- for (Invoker minvoker : counter.keySet()) {
- Long count = counter.get(minvoker).get();
-
- if (count == 0) {
- unHitedInvokerCount++;
- } else {
- hitedInvokers.put(minvoker, count);
- }
+ double overloadRatioAllowed = 1.5F;
+ int serverCount = counter.size();
+ double overloadThread = ((double) runs * overloadRatioAllowed)/((double) serverCount);
+ for (Invoker invoker : counter.keySet()) {
+ Long count = counter.get(invoker).get();
+ Assertions.assertTrue(count < (overloadThread + 1L),
Review comment:
这里为啥不是小于overloadThread呢?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ merged pull request #8916: [Dubbo-5961] Improve consistent hashing load balancing with a new algorithm #5989
Posted by GitBox <gi...@apache.org>.
AlbumenJ merged pull request #8916:
URL: https://github.com/apache/dubbo/pull/8916
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org