You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/05/20 02:47:56 UTC

[GitHub] [servicecomb-java-chassis] kaister3 opened a new pull request #2391: [SCB-2266]currentAvailableIndex self-increment after called each time

kaister3 opened a new pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391


   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] kaister3 closed pull request #2391: [SCB-2266]currentAvailableIndex self-increment after called each time

Posted by GitBox <gi...@apache.org>.
kaister3 closed pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] codecov-commenter commented on pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391#issuecomment-846970740


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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 [#2391](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (827e32f) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/0eac3b2f9d8ca95d7429cb589e1ea1e4ba27fe9d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0eac3b2) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 827e32f differs from pull request most recent head e307580. Consider uploading reports for the commit e307580 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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    #2391   +/-   ##
   =========================================
     Coverage     80.30%   80.30%           
     Complexity     1382     1382           
   =========================================
     Files          1560     1560           
     Lines         41569    41571    +2     
     Branches       3488     3488           
   =========================================
   + Hits          33381    33385    +4     
   + Misses         6680     6679    -1     
   + Partials       1508     1507    -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...vicecomb/serviceregistry/client/IpPortManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9JcFBvcnRNYW5hZ2VyLmphdmE=) | `93.61% <100.00%> (+2.50%)` | `0.00 <0.00> (ø)` | |
   | [...omb/transport/rest/client/RestTransportClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-dHJhbnNwb3J0cy90cmFuc3BvcnQtcmVzdC90cmFuc3BvcnQtcmVzdC1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3RyYW5zcG9ydC9yZXN0L2NsaWVudC9SZXN0VHJhbnNwb3J0Q2xpZW50LmphdmE=) | `83.33% <0.00%> (-16.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...b/core/invocation/timeout/PassingTimeStrategy.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9pbnZvY2F0aW9uL3RpbWVvdXQvUGFzc2luZ1RpbWVTdHJhdGVneS5qYXZh) | `94.44% <0.00%> (-5.56%)` | `0.00% <0.00%> (ø%)` | |
   | [...vicecomb/faultinjection/FaultInjectionHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-aGFuZGxlcnMvaGFuZGxlci1mYXVsdC1pbmplY3Rpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZhdWx0aW5qZWN0aW9uL0ZhdWx0SW5qZWN0aW9uSGFuZGxlci5qYXZh) | `80.95% <0.00%> (-4.77%)` | `0.00% <0.00%> (ø%)` | |
   | [...ecomb/provider/pojo/PojoConsumerMetaRefresher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-cHJvdmlkZXJzL3Byb3ZpZGVyLXBvam8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3Byb3ZpZGVyL3Bvam8vUG9qb0NvbnN1bWVyTWV0YVJlZnJlc2hlci5qYXZh) | `75.60% <0.00%> (-2.44%)` | `0.00% <0.00%> (ø%)` | |
   | [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1NlcnZpY2VSZWdpc3RyeUNsaWVudEltcGwuamF2YQ==) | `69.51% <0.00%> (+0.77%)` | `0.00% <0.00%> (ø%)` | |
   | [...mb/serviceregistry/client/http/RestClientUtil.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1Jlc3RDbGllbnRVdGlsLmphdmE=) | `77.57% <0.00%> (+1.86%)` | `0.00% <0.00%> (ø%)` | |
   | [...ache/servicecomb/registry/cache/InstanceCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvY2FjaGUvSW5zdGFuY2VDYWNoZS5qYXZh) | `85.36% <0.00%> (+2.43%)` | `0.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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/servicecomb-java-chassis/pull/2391?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 [0eac3b2...e307580](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391#discussion_r639349974



##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/client/IpPortManager.java
##########
@@ -91,22 +91,14 @@ public void initAutoDiscovery() {
     }
   }
 
-  public IpPort getNextAvailableAddress(IpPort failedIpPort) {
+  public IpPort getAvailableAddress() {
     int currentIndex = currentAvailableIndex.get();
-    IpPort current = getAvailableAddress(currentIndex);
-    if (current.equals(failedIpPort)) {
-      currentAvailableIndex.compareAndSet(currentIndex, currentIndex + 1);
-      current = getAvailableAddress();
-    }
-
-    LOGGER.info("Change service center address from {} to {}", failedIpPort.toString(), current.toString());
+    currentAvailableIndex.compareAndSet(currentIndex, currentIndex + 1);
+    IpPort current =  getAvailableAddress(currentAvailableIndex.get());

Review comment:
       Maybe currentIndex.increamentAndGet is much simpler. 




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] codecov-commenter edited a comment on pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391#issuecomment-846970740


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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 [#2391](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e4d6b35) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/0eac3b2f9d8ca95d7429cb589e1ea1e4ba27fe9d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0eac3b2) will **decrease** coverage by `0.01%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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    #2391      +/-   ##
   ============================================
   - Coverage     80.30%   80.28%   -0.02%     
     Complexity     1382     1382              
   ============================================
     Files          1560     1560              
     Lines         41569    41564       -5     
     Branches       3488     3487       -1     
   ============================================
   - Hits          33381    33371      -10     
   - Misses         6680     6685       +5     
     Partials       1508     1508              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...vicecomb/serviceregistry/client/IpPortManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9JcFBvcnRNYW5hZ2VyLmphdmE=) | `92.10% <100.00%> (+0.99%)` | :arrow_up: |
   | [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1NlcnZpY2VSZWdpc3RyeUNsaWVudEltcGwuamF2YQ==) | `68.85% <100.00%> (+0.12%)` | :arrow_up: |
   | [...omb/transport/rest/client/RestTransportClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-dHJhbnNwb3J0cy90cmFuc3BvcnQtcmVzdC90cmFuc3BvcnQtcmVzdC1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3RyYW5zcG9ydC9yZXN0L2NsaWVudC9SZXN0VHJhbnNwb3J0Q2xpZW50LmphdmE=) | `83.33% <0.00%> (-16.67%)` | :arrow_down: |
   | [...ache/servicecomb/foundation/common/net/IpPort.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL25ldC9JcFBvcnQuamF2YQ==) | `83.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...vicecomb/faultinjection/FaultInjectionHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-aGFuZGxlcnMvaGFuZGxlci1mYXVsdC1pbmplY3Rpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZhdWx0aW5qZWN0aW9uL0ZhdWx0SW5qZWN0aW9uSGFuZGxlci5qYXZh) | `80.95% <0.00%> (-4.77%)` | :arrow_down: |
   | [.../servicecomb/config/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWNjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb25maWcvY2xpZW50L0NvbmZpZ0NlbnRlckNsaWVudC5qYXZh) | `52.10% <0.00%> (-0.43%)` | :arrow_down: |
   | [...ache/servicecomb/registry/cache/InstanceCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvY2FjaGUvSW5zdGFuY2VDYWNoZS5qYXZh) | `85.36% <0.00%> (+2.43%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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/servicecomb-java-chassis/pull/2391?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 [0eac3b2...e4d6b35](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391#discussion_r639353041



##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java
##########
@@ -121,7 +121,7 @@ public void init() {
 
   private void retry(RequestContext requestContext, Handler<RestResponse> responseHandler) {
     LOGGER.warn("invoke service [{}] failed, retry.", requestContext.getUri());
-    requestContext.setIpPort(ipPortManager.getNextAvailableAddress(requestContext.getIpPort()));
+    requestContext.setIpPort(ipPortManager.getAvailableAddress());

Review comment:
       This log message can be improved, e.g.
   
   ```
   LOGGER.warn("invoke service [{}] failed, retry address {}.", requestContext.getUri(), ipPortManager.getAvailableAddress());
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] kaister3 closed pull request #2391: [SCB-2266]currentAvailableIndex self-increment after called each time

Posted by GitBox <gi...@apache.org>.
kaister3 closed pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] codecov-commenter edited a comment on pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391#issuecomment-846970740


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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 [#2391](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e307580) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/0eac3b2f9d8ca95d7429cb589e1ea1e4ba27fe9d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0eac3b2) will **decrease** coverage by `0.02%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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    #2391      +/-   ##
   ============================================
   - Coverage     80.30%   80.28%   -0.03%     
     Complexity     1382     1382              
   ============================================
     Files          1560     1560              
     Lines         41569    41566       -3     
     Branches       3488     3487       -1     
   ============================================
   - Hits          33381    33370      -11     
   - Misses         6680     6687       +7     
   - Partials       1508     1509       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...vicecomb/serviceregistry/client/IpPortManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9JcFBvcnRNYW5hZ2VyLmphdmE=) | `92.85% <100.00%> (+1.74%)` | `0.00 <0.00> (ø)` | |
   | [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1NlcnZpY2VSZWdpc3RyeUNsaWVudEltcGwuamF2YQ==) | `68.73% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...omb/transport/rest/client/RestTransportClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-dHJhbnNwb3J0cy90cmFuc3BvcnQtcmVzdC90cmFuc3BvcnQtcmVzdC1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3RyYW5zcG9ydC9yZXN0L2NsaWVudC9SZXN0VHJhbnNwb3J0Q2xpZW50LmphdmE=) | `83.33% <0.00%> (-16.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...ache/servicecomb/foundation/common/net/IpPort.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL25ldC9JcFBvcnQuamF2YQ==) | `83.33% <0.00%> (-6.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...thentication/consumer/RSAConsumerTokenManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-aGFuZGxlcnMvaGFuZGxlci1wdWJsaWNrZXktYXV0aC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvYXV0aGVudGljYXRpb24vY29uc3VtZXIvUlNBQ29uc3VtZXJUb2tlbk1hbmFnZXIuamF2YQ==) | `70.96% <0.00%> (-6.46%)` | `0.00% <0.00%> (ø%)` | |
   | [...vicecomb/faultinjection/FaultInjectionHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-aGFuZGxlcnMvaGFuZGxlci1mYXVsdC1pbmplY3Rpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZhdWx0aW5qZWN0aW9uL0ZhdWx0SW5qZWN0aW9uSGFuZGxlci5qYXZh) | `80.95% <0.00%> (-4.77%)` | `0.00% <0.00%> (ø%)` | |
   | [.../servicecomb/registry/discovery/DiscoveryTree.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvZGlzY292ZXJ5L0Rpc2NvdmVyeVRyZWUuamF2YQ==) | `96.49% <0.00%> (-3.51%)` | `0.00% <0.00%> (ø%)` | |
   | [...ache/servicecomb/registry/cache/InstanceCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvY2FjaGUvSW5zdGFuY2VDYWNoZS5qYXZh) | `85.36% <0.00%> (+2.43%)` | `0.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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/servicecomb-java-chassis/pull/2391?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 [0eac3b2...e307580](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2391?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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2391: [SCB-2266]IpPortManager Uses RoundRobin rule

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2391:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2391#discussion_r639349804



##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/client/IpPortManager.java
##########
@@ -91,22 +91,14 @@ public void initAutoDiscovery() {
     }
   }
 
-  public IpPort getNextAvailableAddress(IpPort failedIpPort) {
+  public IpPort getAvailableAddress() {
     int currentIndex = currentAvailableIndex.get();
-    IpPort current = getAvailableAddress(currentIndex);
-    if (current.equals(failedIpPort)) {
-      currentAvailableIndex.compareAndSet(currentIndex, currentIndex + 1);
-      current = getAvailableAddress();
-    }
-
-    LOGGER.info("Change service center address from {} to {}", failedIpPort.toString(), current.toString());
+    currentAvailableIndex.compareAndSet(currentIndex, currentIndex + 1);
+    IpPort current =  getAvailableAddress(currentAvailableIndex.get());
+    LOGGER.info("Change service center address to {}", current.toString());

Review comment:
       Do not print this log, because too much.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org