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 2022/01/11 09:14:22 UTC
[GitHub] [servicecomb-java-chassis] develpoerX opened a new pull request #2691: #SCB-2361 Support AZ affinity ( Part 1)
develpoerX opened a new pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
---
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r801244551
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterClient.java
##########
@@ -65,8 +66,9 @@ public QueryConfigurationsResponse queryConfigurations(QueryConfigurationsReques
Map<String, Object> configurations = new HashMap<>();
String uri = null;
+ AddressStatus currentAddress = new AddressStatus(null,addressManager.address());
Review comment:
format
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (97baf36) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `1.03%`.
> The diff coverage is `22.17%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 76.64% -1.04%
+ Complexity 1429 1413 -16
============================================
Files 1598 1617 +19
Lines 42740 43429 +689
Branches 3606 3682 +76
============================================
+ Hits 33202 33288 +86
- Misses 8027 8599 +572
- Partials 1511 1542 +31
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...rvicecomb/config/center/client/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (-68.75%)` | :arrow_down: |
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...comb/config/center/client/ConfigCenterManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyTWFuYWdlci5qYXZh) | `0.00% <0.00%> (-65.39%)` | :arrow_down: |
| [...mb/config/center/client/model/EndpointAddress.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvbW9kZWwvRW5kcG9pbnRBZGRyZXNzLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ecomb/config/kie/client/model/EndpointAddress.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvRW5kcG9pbnRBZGRyZXNzLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...client/event/ConfigCenterEndpointChangedEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0NvbmZpZ0NlbnRlckVuZHBvaW50Q2hhbmdlZEV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...p/client/event/KieEndpointEndPointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0tpZUVuZHBvaW50RW5kUG9pbnRDaGFuZ2VFdmVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../http/client/event/MonitorEndpointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L01vbml0b3JFbmRwb2ludENoYW5nZUV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| ... and [88 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...97baf36](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790090995
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -17,25 +17,32 @@
package org.apache.servicecomb.config.center.client;
-import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
+import org.apache.servicecomb.http.client.common.EndpointAddress;
import org.apache.servicecomb.http.client.common.HttpUtils;
+import org.apache.servicecomb.http.client.event.CommonEventManager;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+
+import com.google.common.eventbus.Subscribe;
public class AddressManager {
+
public static final String DEFAULT_PROJECT = "default";
private final String projectName;
- private final List<String> addresses;
+ private EndpointAddress endpointAddress;
Review comment:
Maybe do not need class `EndpointAddress`, the logic can put in `AddressManager`.
Can create new `AbstractAddressManager` and all `AddressManager` extends it.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5341b5a) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.54%`.
> The diff coverage is `52.26%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.14% -0.55%
+ Complexity 1429 1413 -16
============================================
Files 1598 1613 +15
Lines 42740 43153 +413
Branches 3606 3664 +58
============================================
+ Hits 33202 33289 +87
- Misses 8027 8316 +289
- Partials 1511 1548 +37
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...rvicecomb/config/center/client/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (-68.75%)` | :arrow_down: |
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyRGlzY292ZXJ5LmphdmE=) | `0.00% <ø> (ø)` | |
| [.../service/center/client/ServiceCenterRawClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyUmF3Q2xpZW50LmphdmE=) | `65.71% <0.00%> (-1.94%)` | :arrow_down: |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...mb/config/ConfigCenterConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWNjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb25maWcvQ29uZmlnQ2VudGVyQ29uZmlndXJhdGlvblNvdXJjZUltcGwuamF2YQ==) | `9.78% <0.00%> (-39.67%)` | :arrow_down: |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../huaweicloud/dashboard/monitor/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-aHVhd2VpLWNsb3VkL2Rhc2hib2FyZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvaHVhd2VpY2xvdWQvZGFzaGJvYXJkL21vbml0b3IvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| ... and [90 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...5341b5a](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790133979
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/event/RefreshEndpointEvent.java
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.event;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class RefreshEndpointEvent {
+
+ private static final String SAME_ZONE = "sameZone";
+
+ private static final String SAME_REGION = "sameRegion";
+
+ private Map<String, List<String>> zoneAndRegion;
+
+ private String name;
+
+ public RefreshEndpointEvent(Map<String, List<String>> zoneAndRegion, String name) {
Review comment:
I think there is little difference between packaging and disassembly, and disassembly is not conducive to expansion
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aba70e0) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.54%`.
> The diff coverage is `26.84%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.14% -0.55%
- Complexity 1429 1437 +8
============================================
Files 1598 1607 +9
Lines 42740 43273 +533
Branches 3606 3663 +57
============================================
+ Hits 33202 33382 +180
- Misses 8027 8357 +330
- Partials 1511 1534 +23
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ecomb/config/kie/client/model/EndpointAddress.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvRW5kcG9pbnRBZGRyZXNzLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...client/event/ConfigCenterEndpointChangedEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0NvbmZpZ0NlbnRlckVuZHBvaW50Q2hhbmdlZEV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...p/client/event/KieEndpointEndPointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0tpZUVuZHBvaW50RW5kUG9pbnRDaGFuZ2VFdmVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../http/client/event/MonitorEndpointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L01vbml0b3JFbmRwb2ludENoYW5nZUV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyRGlzY292ZXJ5LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterRawClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyUmF3Q2xpZW50LmphdmE=) | `63.88% <0.00%> (-3.76%)` | :arrow_down: |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [36 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...aba70e0](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790361860
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/common/AbstractAddressManager.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+
+public class AbstractAddressManager {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AbstractAddressManager.class);
+
+ private List<String> addresses = new ArrayList<>();
+
+ private int index = 0;
+
+ private String projectName;
+
+ private String key;
+
+ private String currentAddress = "";
+
+ public static final String DEFAULT_PROJECT = "default";
+
+ private volatile List<String> availableZone = new ArrayList<>();
+
+ private volatile List<String> availableRegion = new ArrayList<>();
+
+ private Cache<String, Boolean> availableIpCache = CacheBuilder.newBuilder()
+ .maximumSize(100)
+ .expireAfterWrite(10, TimeUnit.MINUTES)
+ .build();
+
+ public AbstractAddressManager(List<String> addresses) {
+ this.addresses.addAll(addresses);
+ }
+
+ public AbstractAddressManager(String projectName, List<String> addresses, String key) {
+ this.projectName = StringUtils.isEmpty(projectName) ? DEFAULT_PROJECT : projectName;
+ this.key = key;
+ this.addresses = this.transformAddress(addresses);
+ }
+
+ public String formatUrl(String url, boolean absoluteUrl) {
+ currentAddress = address();
+ return absoluteUrl ? currentAddress + url : formatAddress(currentAddress) + url;
+ }
+
+ public String address() {
+ return getAvailableZoneAddress();
+ }
+
+ public boolean sslEnabled() {
+ return address().startsWith("https://");
+ }
+
+ private List<String> transformAddress(List<String> addresses) {
+ if (key == "/v3/") {
Review comment:
No correct, move logic to sub classes.
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790456728
##########
File path: huawei-cloud/dashboard/src/main/java/org/apache/servicecomb/huaweicloud/dashboard/monitor/DefaultMonitorDataPublisher.java
##########
@@ -67,7 +70,14 @@
@Override
public void init() {
try {
- addressManager = new AddressManager();
+ List<String> addresses = null;
+ SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(
+ MonitorConstant.SYSTEM_KEY_DASHBOARD_SERVICE);
+ if (info != null && info.getAccessURL() != null) {
+ addresses.addAll(info.getAccessURL());
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3f6aff1) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.84%`.
> The diff coverage is `28.39%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 76.84% -0.85%
+ Complexity 1429 1413 -16
============================================
Files 1598 1615 +17
Lines 42740 43311 +571
Branches 3606 3672 +66
============================================
+ Hits 33202 33281 +79
- Misses 8027 8486 +459
- Partials 1511 1544 +33
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...rvicecomb/config/center/client/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (-68.75%)` | :arrow_down: |
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...comb/config/center/client/ConfigCenterManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyTWFuYWdlci5qYXZh) | `0.00% <0.00%> (-65.39%)` | :arrow_down: |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...client/event/ConfigCenterEndpointChangedEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0NvbmZpZ0NlbnRlckVuZHBvaW50Q2hhbmdlZEV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...p/client/event/KieEndpointEndPointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0tpZUVuZHBvaW50RW5kUG9pbnRDaGFuZ2VFdmVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../http/client/event/MonitorEndpointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L01vbml0b3JFbmRwb2ludENoYW5nZUV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyRGlzY292ZXJ5LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterRawClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyUmF3Q2xpZW50LmphdmE=) | `63.88% <0.00%> (-3.76%)` | :arrow_down: |
| ... and [88 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...3f6aff1](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: #SCB-2361 Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (36c45ae) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.56%`.
> The diff coverage is `24.91%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.12% -0.57%
- Complexity 1429 1437 +8
============================================
Files 1598 1606 +8
Lines 42740 43289 +549
Branches 3606 3671 +65
============================================
+ Hits 33202 33385 +183
- Misses 8027 8373 +346
- Partials 1511 1531 +20
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ecomb/config/kie/client/model/EndpointAddress.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvRW5kcG9pbnRBZGRyZXNzLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...client/event/ConfigCenterEndpointChangedEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0NvbmZpZ0NlbnRlckVuZHBvaW50Q2hhbmdlZEV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...p/client/event/KieEndpointEndPointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0tpZUVuZHBvaW50RW5kUG9pbnRDaGFuZ2VFdmVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../http/client/event/MonitorEndpointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L01vbml0b3JFbmRwb2ludENoYW5nZUV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...b/service/center/client/model/EndpointAddress.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9tb2RlbC9FbmRwb2ludEFkZHJlc3MuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../huaweicloud/dashboard/monitor/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-aHVhd2VpLWNsb3VkL2Rhc2hib2FyZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvaHVhd2VpY2xvdWQvZGFzaGJvYXJkL21vbml0b3IvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| ... and [31 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...36c45ae](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790112145
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterManager.java
##########
@@ -77,10 +79,15 @@ public void execute() {
ConfigurationChangedEvent event = ConfigurationChangedEvent
.createIncremental(configConverter.getCurrentData(), lastData);
eventBus.post(event);
+ retryTimes=0;
}
startTask(new BackOffSleepTask(POLL_INTERVAL, new PollConfigurationTask(0)));
} catch (Exception e) {
LOGGER.error("get configurations from ConfigCenter failed, and will try again.", e);
+ ++retryTimes;
+ if(retryTimes < 3) {
+ startTask(new BackOffSleepTask(0, new PollConfigurationTask(0)));
+ }
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790361807
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/common/AbstractAddressManager.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+
+public class AbstractAddressManager {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AbstractAddressManager.class);
+
+ private List<String> addresses = new ArrayList<>();
+
+ private int index = 0;
+
+ private String projectName;
+
+ private String key;
+
+ private String currentAddress = "";
+
+ public static final String DEFAULT_PROJECT = "default";
+
+ private volatile List<String> availableZone = new ArrayList<>();
+
+ private volatile List<String> availableRegion = new ArrayList<>();
+
+ private Cache<String, Boolean> availableIpCache = CacheBuilder.newBuilder()
+ .maximumSize(100)
+ .expireAfterWrite(10, TimeUnit.MINUTES)
+ .build();
+
+ public AbstractAddressManager(List<String> addresses) {
+ this.addresses.addAll(addresses);
+ }
+
+ public AbstractAddressManager(String projectName, List<String> addresses, String key) {
+ this.projectName = StringUtils.isEmpty(projectName) ? DEFAULT_PROJECT : projectName;
+ this.key = key;
+ this.addresses = this.transformAddress(addresses);
+ }
+
+ public String formatUrl(String url, boolean absoluteUrl) {
+ currentAddress = address();
+ return absoluteUrl ? currentAddress + url : formatAddress(currentAddress) + url;
+ }
+
+ public String address() {
+ return getAvailableZoneAddress();
+ }
+
+ public boolean sslEnabled() {
+ return address().startsWith("https://");
+ }
+
+ private List<String> transformAddress(List<String> addresses) {
+ if (key == "/v3/") {
Review comment:
No correct, move logic to sub classes.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790091526
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -47,16 +54,29 @@ private String formatAddress(String address) {
}
public String address() {
- synchronized (this) {
- this.index++;
- if (this.index >= addresses.size()) {
- this.index = 0;
- }
- return addresses.get(index);
- }
+ return endpointAddress.getAvailableZoneAddress();
}
public boolean sslEnabled() {
- return address().startsWith("https://");
+ isSSLEnable = address().startsWith("https://");
+ return isSSLEnable;
+ }
+
+ public EndpointAddress getEndpointAddress() {
+ return endpointAddress;
+ }
+
+ public void setEndpointAddress(EndpointAddress endpointAddress) {
+ this.endpointAddress = endpointAddress;
+ }
+
+ @Subscribe
+ public void onRefreshEndpointEvent(RefreshEndpointEvent event) {
+ if (null == event || event.getName() != "CseConfigCenter") {
+ return;
+ }
+ endpointAddress.setAvailableZone(event.getSameZone());
+ endpointAddress.setAvailableRegion(event.getSameRegion());
+ endpointAddress.refreshCache();
Review comment:
Encapsulation. Maybe calcute address groups can encapsulte in AddressManager. Events only send the server list. e.g. List<AddressInfo> where AddresInfo has address, zone, az information.
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790121849
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -47,16 +54,29 @@ private String formatAddress(String address) {
}
public String address() {
- synchronized (this) {
- this.index++;
- if (this.index >= addresses.size()) {
- this.index = 0;
- }
- return addresses.get(index);
- }
+ return endpointAddress.getAvailableZoneAddress();
}
public boolean sslEnabled() {
- return address().startsWith("https://");
+ isSSLEnable = address().startsWith("https://");
+ return isSSLEnable;
+ }
+
+ public EndpointAddress getEndpointAddress() {
+ return endpointAddress;
+ }
+
+ public void setEndpointAddress(EndpointAddress endpointAddress) {
+ this.endpointAddress = endpointAddress;
+ }
+
+ @Subscribe
+ public void onRefreshEndpointEvent(RefreshEndpointEvent event) {
+ if (null == event || event.getName() != "CseConfigCenter") {
+ return;
+ }
+ endpointAddress.setAvailableZone(event.getSameZone());
+ endpointAddress.setAvailableRegion(event.getSameRegion());
+ endpointAddress.refreshCache();
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790122071
##########
File path: clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/ServiceCenterDiscovery.java
##########
@@ -147,6 +148,18 @@ public void onPullInstanceEvent(PullInstanceEvent event) {
pullAllInstance();
}
+ public List<MicroserviceInstance> findServiceInstance(String appId, String serviceName, String versionRule) {
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: #SCB-2361 Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e4f401e) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.53%`.
> The diff coverage is `35.27%`.
> :exclamation: Current head e4f401e differs from pull request most recent head 76fc380. Consider uploading reports for the commit 76fc380 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.15% -0.54%
- Complexity 1429 1437 +8
============================================
Files 1598 1607 +9
Lines 42740 43265 +525
Branches 3606 3661 +55
============================================
+ Hits 33202 33380 +178
- Misses 8027 8351 +324
- Partials 1511 1534 +23
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ecomb/config/kie/client/model/EndpointAddress.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvRW5kcG9pbnRBZGRyZXNzLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...client/event/ConfigCenterEndpointChangedEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0NvbmZpZ0NlbnRlckVuZHBvaW50Q2hhbmdlZEV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...p/client/event/KieEndpointEndPointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0tpZUVuZHBvaW50RW5kUG9pbnRDaGFuZ2VFdmVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../http/client/event/MonitorEndpointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L01vbml0b3JFbmRwb2ludENoYW5nZUV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyRGlzY292ZXJ5LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterRawClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyUmF3Q2xpZW50LmphdmE=) | `63.88% <0.00%> (-3.76%)` | :arrow_down: |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [33 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...76fc380](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r801246358
##########
File path: huawei-cloud/dashboard/src/main/java/org/apache/servicecomb/huaweicloud/dashboard/monitor/DefaultMonitorDataPublisher.java
##########
@@ -93,6 +105,7 @@ public void publish(MonitorDaraProvider provider) {
}
private void doSend(String endpoint, String jsonData, String url, IpPort host, int times) {
+ AddressStatus addressStatus = new AddressStatus(null,endpoint);
Review comment:
format
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790090758
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -17,25 +17,32 @@
package org.apache.servicecomb.config.center.client;
-import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
+import org.apache.servicecomb.http.client.common.EndpointAddress;
import org.apache.servicecomb.http.client.common.HttpUtils;
+import org.apache.servicecomb.http.client.event.CommonEventManager;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+
+import com.google.common.eventbus.Subscribe;
public class AddressManager {
+
public static final String DEFAULT_PROJECT = "default";
private final String projectName;
- private final List<String> addresses;
+ private EndpointAddress endpointAddress;
- private int index = 0;
+ private boolean isSSLEnable = false;
Review comment:
`sslEnabled`
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790133724
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/event/CommonEventManager.java
##########
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.event;
+
+import com.google.common.eventbus.EventBus;
+
+/**
+ * EventManager for chassis events
+ *
+ */
+public class CommonEventManager {
Review comment:
done
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/event/CommonEventManager.java
##########
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.event;
+
+import com.google.common.eventbus.EventBus;
+
+/**
+ * EventManager for chassis events
+ *
+ */
+public class CommonEventManager {
Review comment:
Keep this public event class first, because it involves the inconsistency of multiple events after unification, and the event logic of the service center client module needs to be modified. To ensure reliability, retain this logic for the time being.
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] codecov-commenter commented on pull request #2691: #SCB-2361 Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5d2b507) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.42%`.
> The diff coverage is `37.31%`.
> :exclamation: Current head 5d2b507 differs from pull request most recent head 952ee63. Consider uploading reports for the commit 952ee63 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.25% -0.43%
- Complexity 1429 1435 +6
============================================
Files 1598 1603 +5
Lines 42740 43199 +459
Branches 3606 3666 +60
============================================
+ Hits 33202 33374 +172
- Misses 8027 8292 +265
- Partials 1511 1533 +22
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...client/event/ConfigCenterEndpointChangedEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0NvbmZpZ0NlbnRlckVuZHBvaW50Q2hhbmdlZEV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...p/client/event/KieEndpointEndPointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L0tpZUVuZHBvaW50RW5kUG9pbnRDaGFuZ2VFdmVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../http/client/event/MonitorEndpointChangeEvent.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9odHRwLWNsaWVudC1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2h0dHAvY2xpZW50L2V2ZW50L01vbml0b3JFbmRwb2ludENoYW5nZUV2ZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...mb/foundation/common/config/PaaSResourceUtils.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL2NvbmZpZy9QYWFTUmVzb3VyY2VVdGlscy5qYXZh) | `62.16% <ø> (+4.66%)` | :arrow_up: |
| [.../huaweicloud/dashboard/monitor/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-aHVhd2VpLWNsb3VkL2Rhc2hib2FyZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvaHVhd2VpY2xvdWQvZGFzaGJvYXJkL21vbml0b3IvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...dashboard/monitor/DefaultMonitorDataPublisher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-aHVhd2VpLWNsb3VkL2Rhc2hib2FyZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvaHVhd2VpY2xvdWQvZGFzaGJvYXJkL21vbml0b3IvRGVmYXVsdE1vbml0b3JEYXRhUHVibGlzaGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| ... and [29 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...952ee63](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f73ebee) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.42%`.
> The diff coverage is `68.28%`.
> :exclamation: Current head f73ebee differs from pull request most recent head 593daac. Consider uploading reports for the commit 593daac to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.25% -0.43%
+ Complexity 1429 1414 -15
============================================
Files 1598 1614 +16
Lines 42740 43175 +435
Branches 3606 3660 +54
============================================
+ Hits 33202 33357 +155
- Misses 8027 8283 +256
- Partials 1511 1535 +24
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...comb/core/exception/DefaultExceptionProcessor.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9leGNlcHRpb24vRGVmYXVsdEV4Y2VwdGlvblByb2Nlc3Nvci5qYXZh) | `55.07% <0.00%> (-1.65%)` | :arrow_down: |
| [.../apache/servicecomb/core/governance/MatchType.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9nb3Zlcm5hbmNlL01hdGNoVHlwZS5qYXZh) | `40.00% <ø> (ø)` | |
| [...vernance/ServiceCombConfigurationEventAdapter.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9nb3Zlcm5hbmNlL1NlcnZpY2VDb21iQ29uZmlndXJhdGlvbkV2ZW50QWRhcHRlci5qYXZh) | `21.42% <ø> (ø)` | |
| [.../core/governance/ServiceCombInvocationContext.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9nb3Zlcm5hbmNlL1NlcnZpY2VDb21iSW52b2NhdGlvbkNvbnRleHQuamF2YQ==) | `81.25% <ø> (ø)` | |
| [...b/core/governance/ServiceCombMicroserviceMeta.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9nb3Zlcm5hbmNlL1NlcnZpY2VDb21iTWljcm9zZXJ2aWNlTWV0YS5qYXZh) | `33.33% <ø> (ø)` | |
| [...xrs/client/CustomLoadbalanceExtensionsFactory.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZGVtby9kZW1vLWpheHJzL2pheHJzLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZGVtby9qYXhycy9jbGllbnQvQ3VzdG9tTG9hZGJhbGFuY2VFeHRlbnNpb25zRmFjdG9yeS5qYXZh) | `27.27% <0.00%> (-37.02%)` | :arrow_down: |
| [...mb/config/ConfigCenterConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWNjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb25maWcvQ29uZmlnQ2VudGVyQ29uZmlndXJhdGlvblNvdXJjZUltcGwuamF2YQ==) | `9.78% <0.00%> (-39.67%)` | :arrow_down: |
| ... and [98 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...593daac](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4242435) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.41%`.
> The diff coverage is `65.89%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.27% -0.42%
+ Complexity 1429 1414 -15
============================================
Files 1598 1613 +15
Lines 42740 43159 +419
Branches 3606 3657 +51
============================================
+ Hits 33202 33349 +147
- Misses 8027 8276 +249
- Partials 1511 1534 +23
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...mb/config/ConfigCenterConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWNjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb25maWcvQ29uZmlnQ2VudGVyQ29uZmlndXJhdGlvblNvdXJjZUltcGwuamF2YQ==) | `9.78% <0.00%> (-39.67%)` | :arrow_down: |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dashboard/monitor/DefaultMonitorDataPublisher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-aHVhd2VpLWNsb3VkL2Rhc2hib2FyZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvaHVhd2VpY2xvdWQvZGFzaGJvYXJkL21vbml0b3IvRGVmYXVsdE1vbml0b3JEYXRhUHVibGlzaGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../apache/servicecomb/serviceregistry/api/Const.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2FwaS9Db25zdC5qYXZh) | `36.73% <ø> (ø)` | |
| [...omb/serviceregistry/auth/RBACBootStrapService.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2F1dGgvUkJBQ0Jvb3RTdHJhcFNlcnZpY2UuamF2YQ==) | `8.53% <0.00%> (ø)` | |
| [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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==) | `71.04% <33.33%> (+0.16%)` | :arrow_up: |
| [...rvicecomb/config/center/client/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `50.00% <50.00%> (-18.75%)` | :arrow_down: |
| ... and [87 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...4242435](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (68cbdeb) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.66%`.
> The diff coverage is `57.69%`.
> :exclamation: Current head 68cbdeb differs from pull request most recent head 2e1ebae. Consider uploading reports for the commit 2e1ebae to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.02% -0.67%
+ Complexity 1429 1413 -16
============================================
Files 1598 1612 +14
Lines 42740 43205 +465
Branches 3606 3667 +61
============================================
+ Hits 33202 33278 +76
- Misses 8027 8385 +358
- Partials 1511 1542 +31
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...rvicecomb/config/center/client/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (-68.75%)` | :arrow_down: |
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...comb/config/center/client/ConfigCenterManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyTWFuYWdlci5qYXZh) | `0.00% <0.00%> (-65.39%)` | :arrow_down: |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...omb/config/kie/client/model/KieAddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvbW9kZWwvS2llQWRkcmVzc01hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyRGlzY292ZXJ5LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../service/center/client/ServiceCenterRawClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyUmF3Q2xpZW50LmphdmE=) | `63.88% <0.00%> (-3.76%)` | :arrow_down: |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...comb/core/exception/DefaultExceptionProcessor.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9leGNlcHRpb24vRGVmYXVsdEV4Y2VwdGlvblByb2Nlc3Nvci5qYXZh) | `55.07% <0.00%> (-1.65%)` | :arrow_down: |
| [.../apache/servicecomb/core/governance/MatchType.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9nb3Zlcm5hbmNlL01hdGNoVHlwZS5qYXZh) | `40.00% <ø> (ø)` | |
| ... and [94 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...2e1ebae](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790091919
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/event/CommonEventManager.java
##########
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.event;
+
+import com.google.common.eventbus.EventBus;
+
+/**
+ * EventManager for chassis events
+ *
+ */
+public class CommonEventManager {
Review comment:
no need add this class , use eventBus from outside paramter.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790091362
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -47,16 +54,29 @@ private String formatAddress(String address) {
}
public String address() {
- synchronized (this) {
- this.index++;
- if (this.index >= addresses.size()) {
- this.index = 0;
- }
- return addresses.get(index);
- }
+ return endpointAddress.getAvailableZoneAddress();
}
public boolean sslEnabled() {
- return address().startsWith("https://");
+ isSSLEnable = address().startsWith("https://");
+ return isSSLEnable;
+ }
+
+ public EndpointAddress getEndpointAddress() {
+ return endpointAddress;
+ }
+
+ public void setEndpointAddress(EndpointAddress endpointAddress) {
+ this.endpointAddress = endpointAddress;
+ }
Review comment:
Encapsulation. Do not expose these two methods to callers.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790090372
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -17,25 +17,32 @@
package org.apache.servicecomb.config.center.client;
-import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
+import org.apache.servicecomb.http.client.common.EndpointAddress;
import org.apache.servicecomb.http.client.common.HttpUtils;
+import org.apache.servicecomb.http.client.event.CommonEventManager;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+
+import com.google.common.eventbus.Subscribe;
public class AddressManager {
+
public static final String DEFAULT_PROJECT = "default";
private final String projectName;
- private final List<String> addresses;
+ private EndpointAddress endpointAddress;
- private int index = 0;
+ private boolean isSSLEnable = false;
public AddressManager(String projectName, List<String> addresses) {
this.projectName = StringUtils.isEmpty(projectName) ? DEFAULT_PROJECT : projectName;
- this.addresses = new ArrayList<>(addresses.size());
- addresses.forEach((address -> this.addresses.add(formatAddress(address))));
+ this.endpointAddress = new EndpointAddress(
+ addresses.stream().map(this::formatAddress).collect(Collectors.toList()));
+ CommonEventManager.register(this);
Review comment:
Maybe add `public AddressManager(String projectName, List<String> addresses, EventBus eventBus)' is better.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790361285
##########
File path: clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/AddressManager.java
##########
@@ -17,47 +17,23 @@
package org.apache.servicecomb.service.center.client;
-import java.util.ArrayList;
import java.util.List;
-import org.apache.servicecomb.http.client.common.HttpUtils;
+import org.apache.servicecomb.http.client.common.AbstractAddressManager;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
-public class AddressManager {
- private final String projectName;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
- private final List<String> addresses;
-
- private int index = 0;
-
- public AddressManager(String projectName, List<String> addresses) {
- this.projectName = projectName;
- this.addresses = new ArrayList<>(addresses.size());
- this.addresses.addAll(addresses);
- }
-
- private String formatAddress(String address) {
- try {
- return address + "/v4/" + HttpUtils.encodeURLParam(this.projectName);
- } catch (Exception e) {
- throw new IllegalStateException("not possible");
- }
+public class AddressManager extends AbstractAddressManager {
+ public AddressManager(String projectName, List<String> addresses, EventBus eventBus) {
+ super(projectName, addresses, "/v4/");
+ eventBus.register(this);
}
- public boolean sslEnabled() {
- return address().startsWith("https://");
- }
-
- public String address() {
- synchronized (this) {
- index++;
- if (index >= addresses.size()) {
- index = 0;
- }
- return addresses.get(index);
- }
- }
- public String formatUrl(String url, boolean absoluteUrl) {
- return absoluteUrl ? address() + url : formatAddress(address()) + url;
+ @Subscribe
+ public void onRefreshEndpointEvent(RefreshEndpointEvent event) {
+ refreshEndpoint(event, "SERVICECENTER");
Review comment:
Define constants in RefreshEndpointEvent
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790359360
##########
File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/KieConfigurationSourceImpl.java
##########
@@ -83,7 +85,7 @@ public boolean isValidSource(Configuration localConfiguration) {
@Override
public void init(Configuration localConfiguration) {
configConverter = new ConfigConverter(KieConfig.INSTANCE.getFileSources());
- KieAddressManager kieAddressManager = configKieAddressManager();
+ kieAddressManager = configKieAddressManager();
Review comment:
kieAddressManager only used once, do not need an instance property
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790437274
##########
File path: clients/config-kie-client/src/main/java/org/apache/servicecomb/config/kie/client/KieClient.java
##########
@@ -52,6 +52,8 @@
protected String revision = "0";
+ private String currentAddress = "";
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790544694
##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/refresh/ClassificationAddress.java
##########
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.serviceregistry.refresh;
+
+import static org.apache.servicecomb.serviceregistry.api.Const.CONFIG_CENTER_NAME;
+import static org.apache.servicecomb.serviceregistry.api.Const.CSE_MONITORING_NAME;
+import static org.apache.servicecomb.serviceregistry.api.Const.KIE_NAME;
+import static org.apache.servicecomb.serviceregistry.api.Const.REGISTRY_APP_ID;
+import static org.apache.servicecomb.serviceregistry.api.Const.REGISTRY_SERVICE_NAME;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.common.net.IpPort;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+import org.apache.servicecomb.registry.RegistrationManager;
+import org.apache.servicecomb.registry.api.registry.DataCenterInfo;
+import org.apache.servicecomb.registry.api.registry.MicroserviceInstance;
+import org.apache.servicecomb.registry.cache.CacheEndpoint;
+import org.apache.servicecomb.registry.cache.InstanceCache;
+import org.apache.servicecomb.registry.cache.InstanceCacheManager;
+import org.apache.servicecomb.registry.definition.DefinitionConst;
+import org.apache.servicecomb.serviceregistry.config.ServiceRegistryConfig;
+import org.apache.servicecomb.serviceregistry.event.ServiceCenterEventBus;
+import org.apache.servicecomb.serviceregistry.registry.cache.MicroserviceCache;
+import org.apache.servicecomb.serviceregistry.registry.cache.MicroserviceCacheRefreshedEvent;
+
+import com.google.common.eventbus.Subscribe;
+
+public class ClassificationAddress {
+
+ private static final String SC_KEY = "SERVICECENTER@default@@0.0.0.0+";
+
+ private static final String CC_KEY = "CseConfigCenter@default@@0.0.0.0+";
+
+ private static final String KIE_KEY = "KIE@default@@0.0.0.0+";
+
+ private static final String MONITORING_KEY = "CseMonitoring@default@@0.0.0.0+";
+
+ private String defaultTransport = "rest";
+
+ private DataCenterInfo dataCenterInfo;
+
+ InstanceCacheManager instanceCacheManager;
+
+ private ArrayList<IpPort> defaultIpPort;
+
+ private int maxRetryTimes;
+
+ public ClassificationAddress(ServiceRegistryConfig serviceRegistryConfig, InstanceCacheManager instanceCacheManager) {
+ this.defaultTransport = serviceRegistryConfig.getTransport();
+ this.defaultIpPort = serviceRegistryConfig.getIpPort();
+ this.instanceCacheManager = instanceCacheManager;
+ this.maxRetryTimes = defaultIpPort.size();
+ ServiceCenterEventBus.getEventBus().register(this);
+ }
+
+ public void InitEndPoint(String typeName) {
Review comment:
`private void initEndPoint`
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790111811
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/AddressManager.java
##########
@@ -17,25 +17,32 @@
package org.apache.servicecomb.config.center.client;
-import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
+import org.apache.servicecomb.http.client.common.EndpointAddress;
import org.apache.servicecomb.http.client.common.HttpUtils;
+import org.apache.servicecomb.http.client.event.CommonEventManager;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+
+import com.google.common.eventbus.Subscribe;
public class AddressManager {
+
public static final String DEFAULT_PROJECT = "default";
private final String projectName;
- private final List<String> addresses;
+ private EndpointAddress endpointAddress;
- private int index = 0;
+ private boolean isSSLEnable = false;
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790359921
##########
File path: huawei-cloud/dashboard/src/main/java/org/apache/servicecomb/huaweicloud/dashboard/monitor/DefaultMonitorDataPublisher.java
##########
@@ -67,7 +70,14 @@
@Override
public void init() {
try {
- addressManager = new AddressManager();
+ List<String> addresses = null;
+ SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(
+ MonitorConstant.SYSTEM_KEY_DASHBOARD_SERVICE);
+ if (info != null && info.getAccessURL() != null) {
+ addresses.addAll(info.getAccessURL());
Review comment:
NPE
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790359267
##########
File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/ConfigCenterConfigurationSourceImpl.java
##########
@@ -87,7 +89,7 @@ public boolean isValidSource(Configuration localConfiguration) {
public void init(Configuration localConfiguration) {
configConverter = new ConfigConverter(ConfigCenterConfig.INSTANCE.getFileSources());
- AddressManager kieAddressManager = configKieAddressManager();
+ kieAddressManager = configKieAddressManager();
Review comment:
kieAddressManager only used once, do not need an instance property
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790092025
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/event/RefreshEndpointEvent.java
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.event;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class RefreshEndpointEvent {
+
+ private static final String SAME_ZONE = "sameZone";
+
+ private static final String SAME_REGION = "sameRegion";
+
+ private Map<String, List<String>> zoneAndRegion;
+
+ private String name;
+
+ public RefreshEndpointEvent(Map<String, List<String>> zoneAndRegion, String name) {
Review comment:
event do not group address, only need to add List<EndpointAddress> or List<AddressInfo>
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790121870
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/common/EndpointAddress.java
##########
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+
+public class EndpointAddress {
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r801247384
##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/refresh/ClassificationAddress.java
##########
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.serviceregistry.refresh;
+
+import static org.apache.servicecomb.serviceregistry.api.Const.CONFIG_CENTER_NAME;
+import static org.apache.servicecomb.serviceregistry.api.Const.CSE_MONITORING_NAME;
+import static org.apache.servicecomb.serviceregistry.api.Const.KIE_NAME;
+import static org.apache.servicecomb.serviceregistry.api.Const.REGISTRY_APP_ID;
+import static org.apache.servicecomb.serviceregistry.api.Const.REGISTRY_SERVICE_NAME;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.common.net.IpPort;
+import org.apache.servicecomb.http.client.event.RefreshEndpointEvent;
+import org.apache.servicecomb.registry.RegistrationManager;
+import org.apache.servicecomb.registry.api.registry.DataCenterInfo;
+import org.apache.servicecomb.registry.api.registry.MicroserviceInstance;
+import org.apache.servicecomb.registry.cache.CacheEndpoint;
+import org.apache.servicecomb.registry.cache.InstanceCache;
+import org.apache.servicecomb.registry.cache.InstanceCacheManager;
+import org.apache.servicecomb.registry.definition.DefinitionConst;
+import org.apache.servicecomb.serviceregistry.config.ServiceRegistryConfig;
+import org.apache.servicecomb.serviceregistry.event.ServiceCenterEventBus;
+import org.apache.servicecomb.serviceregistry.registry.cache.MicroserviceCache;
+import org.apache.servicecomb.serviceregistry.registry.cache.MicroserviceCacheRefreshedEvent;
+
+import com.google.common.eventbus.Subscribe;
+
+public class ClassificationAddress {
+
+ private static final String SC_KEY = "SERVICECENTER@default@@0.0.0.0+";
+
+ private static final String CC_KEY = "CseConfigCenter@default@@0.0.0.0+";
+
+ private static final String KIE_KEY = "KIE@default@@0.0.0.0+";
+
+ private static final String MONITORING_KEY = "CseMonitoring@default@@0.0.0.0+";
+
+ private String defaultTransport = "rest";
+
+ private DataCenterInfo dataCenterInfo;
+
+ InstanceCacheManager instanceCacheManager;
+
+ private ArrayList<IpPort> defaultIpPort;
+
+ private int maxRetryTimes;
+
+ public ClassificationAddress(ServiceRegistryConfig serviceRegistryConfig, InstanceCacheManager instanceCacheManager) {
+ this.defaultTransport = serviceRegistryConfig.getTransport();
+ this.defaultIpPort = serviceRegistryConfig.getIpPort();
+ this.instanceCacheManager = instanceCacheManager;
+ this.maxRetryTimes = defaultIpPort.size();
+ ServiceCenterEventBus.getEventBus().register(this);
+ }
+
+ public void InitEndPoint(String typeName) {
Review comment:
method name should be lower case
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#issuecomment-1015053649
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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 [#2691](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fca1311) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **decrease** coverage by `0.41%`.
> The diff coverage is `67.28%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/2691?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 #2691 +/- ##
============================================
- Coverage 77.68% 77.27% -0.42%
+ Complexity 1429 1414 -15
============================================
Files 1598 1613 +15
Lines 42740 43188 +448
Branches 3606 3662 +56
============================================
+ Hits 33202 33372 +170
- Misses 8027 8277 +250
- Partials 1511 1539 +28
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `0.00% <0.00%> (-44.24%)` | :arrow_down: |
| [...pache/servicecomb/config/kie/client/KieClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWcta2llLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9jbGllbnQvS2llQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...comb/service/center/client/ServiceCenterWatch.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9zZXJ2aWNlLWNlbnRlci1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3NlcnZpY2UvY2VudGVyL2NsaWVudC9TZXJ2aWNlQ2VudGVyV2F0Y2guamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...mb/config/ConfigCenterConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWNjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb25maWcvQ29uZmlnQ2VudGVyQ29uZmlndXJhdGlvblNvdXJjZUltcGwuamF2YQ==) | `10.86% <0.00%> (-38.59%)` | :arrow_down: |
| [...icecomb/config/kie/KieConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-ZHluYW1pYy1jb25maWcvY29uZmlnLWtpZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2tpZS9LaWVDb25maWd1cmF0aW9uU291cmNlSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dashboard/monitor/DefaultMonitorDataPublisher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-aHVhd2VpLWNsb3VkL2Rhc2hib2FyZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvaHVhd2VpY2xvdWQvZGFzaGJvYXJkL21vbml0b3IvRGVmYXVsdE1vbml0b3JEYXRhUHVibGlzaGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../apache/servicecomb/serviceregistry/api/Const.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2FwaS9Db25zdC5qYXZh) | `36.73% <ø> (ø)` | |
| [...omb/serviceregistry/auth/RBACBootStrapService.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2F1dGgvUkJBQ0Jvb3RTdHJhcFNlcnZpY2UuamF2YQ==) | `8.53% <0.00%> (ø)` | |
| [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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==) | `71.04% <33.33%> (+0.16%)` | :arrow_up: |
| [...rvicecomb/config/center/client/AddressManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQWRkcmVzc01hbmFnZXIuamF2YQ==) | `50.00% <50.00%> (-18.75%)` | :arrow_down: |
| ... and [95 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691/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/servicecomb-java-chassis/pull/2691?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/2691?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 [8207a76...fca1311](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2691?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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790437144
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterClient.java
##########
@@ -65,8 +65,9 @@ public QueryConfigurationsResponse queryConfigurations(QueryConfigurationsReques
Map<String, Object> configurations = new HashMap<>();
String uri = null;
+ String currentAddress = addressManager.address();
try {
- uri = addressManager.address() + "/configuration/items?dimensionsInfo="
+ uri = currentAddress + "/configuration/items?dimensionsInfo="
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790437576
##########
File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/ConfigCenterConfigurationSourceImpl.java
##########
@@ -87,7 +89,7 @@ public boolean isValidSource(Configuration localConfiguration) {
public void init(Configuration localConfiguration) {
configConverter = new ConfigConverter(ConfigCenterConfig.INSTANCE.getFileSources());
- AddressManager kieAddressManager = configKieAddressManager();
+ kieAddressManager = configKieAddressManager();
Review comment:
done
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790134116
##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/client/IpPortManager.java
##########
@@ -75,47 +119,202 @@ public IpPortManager(ServiceRegistryConfig serviceRegistryConfig) {
currentAvailableIndex = new AtomicInteger(initialIndex);
LOGGER.info("Initial service center address is {}", getAvailableAddress());
maxRetryTimes = defaultIpPort.size();
+ ServiceCenterEventBus.getEventBus().register(this);
}
// we have to do this operation after the first time setup has already done
public void initAutoDiscovery() {
if (!autoDiscoveryInited && this.serviceRegistryConfig.isRegistryAutoDiscovery()) {
- InstanceCache cache = instanceCacheManager.getOrCreate(REGISTRY_APP_ID,
- REGISTRY_SERVICE_NAME,
- DefinitionConst.VERSION_RULE_LATEST);
- if (cache.getInstanceMap().size() > 0) {
- setAutoDiscoveryInited(true);
- } else {
- setAutoDiscoveryInited(false);
+ for (Type type : Type.values()) {
+ InitEndPoint(type.name());
}
}
}
- public IpPort getAvailableAddress() {
- return getAvailableAddress(currentAvailableIndex.incrementAndGet());
+ private void InitEndPoint(String typeName) {
+ Map<String, List<String>> zoneAndRegion = generateZoneAndRegionAddress(typeName);
+ if (zoneAndRegion == null) {
+ return;
+ }
+ if (typeName.equals(REGISTRY_SERVICE_NAME)) {
+ setAutoDiscoveryInited(true);
+ sameAZ.addAll(zoneAndRegion.get("sameZone"));
+ sameRegion.addAll(zoneAndRegion.get("sameRegion"));
+ }
+ CommonEventManager.post(new RefreshEndpointEvent(zoneAndRegion, typeName));
}
- private IpPort getAvailableAddress(int index) {
- if (index < defaultIpPort.size()) {
- return defaultIpPort.get(index);
+ @Subscribe
+ public void onMicroserviceCacheRefreshed(MicroserviceCacheRefreshedEvent event) {
+ List<MicroserviceCache> microserviceCaches = event.getMicroserviceCaches();
+ if (null == microserviceCaches || microserviceCaches.isEmpty()) {
+ return;
}
- List<CacheEndpoint> endpoints = getDiscoveredIpPort();
- if (endpoints == null || (index >= defaultIpPort.size() + endpoints.size())) {
- currentAvailableIndex.set(0);
- return defaultIpPort.get(0);
+
+ for (MicroserviceCache microserviceCache : microserviceCaches) {
+ if (microserviceCache.getKey().toString().equals(SC_KEY)) {
+ refreshEndPoints(microserviceCache, REGISTRY_SERVICE_NAME);
+ }
+ if (microserviceCache.getKey().toString().equals(CC_KEY)) {
+ refreshEndPoints(microserviceCache, KIE_NAME);
+ }
+ if (microserviceCache.getKey().toString().equals(KIE_KEY)) {
+ refreshEndPoints(microserviceCache, CONFIG_CENTER_NAME);
+ }
+ if (microserviceCache.getKey().toString().equals(MONITORING_KEY)) {
+ refreshEndPoints(microserviceCache, CSE_MONITORING_NAME);
+ }
}
- maxRetryTimes = defaultIpPort.size() + endpoints.size();
- CacheEndpoint nextEndpoint = endpoints.get(index - defaultIpPort.size());
- return new URIEndpointObject(nextEndpoint.getEndpoint());
}
- private List<CacheEndpoint> getDiscoveredIpPort() {
- if (!autoDiscoveryInited || !this.serviceRegistryConfig.isRegistryAutoDiscovery()) {
- return null;
+ private void refreshEndPoints(MicroserviceCache microserviceCache, String name) {
+ Map<String, List<String>> zoneAndRegion = refreshEndPoint(microserviceCache);
+ if (name.equals(REGISTRY_SERVICE_NAME)) {
+ sameAZ = zoneAndRegion.get("sameZone");
+ sameRegion = zoneAndRegion.get("sameRegion");
}
+ CommonEventManager.post(new RefreshEndpointEvent(zoneAndRegion, name));
+ }
+
+ private Map<String, List<String>> refreshEndPoint(MicroserviceCache microserviceCache) {
+ List<String> sameZone = new ArrayList<>();
+ List<String> sameRegion = new ArrayList<>();
+ Map<String, List<String>> zoneAndRegion = new HashMap<>();
+
+ List<MicroserviceInstance> microserviceCacheInstances = microserviceCache.getInstances();
+
+ microserviceCacheInstances.forEach(microserviceInstance -> {
+ String endPoint = microserviceInstance.getEndpoints().get(0);
+ availableIpCache.put(getUri(endPoint), true);
+ if (regionAndAZMatch(dataCenterInfo, microserviceInstance)) {
+ sameZone.add(endPoint);
+ } else {
+ sameRegion.add(endPoint);
+ }
+ });
+ zoneAndRegion.put("sameZone", sameZone);
+ zoneAndRegion.put("sameRegion", sameRegion);
+ return zoneAndRegion;
+ }
+
+ public IpPort getAvailableAddress() {
+ return getAvailableIpPort();
+ }
+
+ private List<CacheEndpoint> getDiscoveredIpPort() {
InstanceCache instanceCache = instanceCacheManager.getOrCreate(REGISTRY_APP_ID,
REGISTRY_SERVICE_NAME,
DefinitionConst.VERSION_RULE_LATEST);
return instanceCache.getOrCreateTransportMap().get(defaultTransport);
}
+
+ private IpPort getAvailableIpPort() {
+ IpPort ipPort = null;
+ if (!autoDiscoveryInited) {
+ ipPort = getDefaultIpPort();
+ } else {
+ List<String> addresses = getAvailableZoneIpPorts();
+ if (addresses.isEmpty()) {
+ ipPort = getDefaultIpPort();
+ } else {
+ if (index.get() >= addresses.size()) {
+ index.set(0);
+ }
+ ipPort = new URIEndpointObject(addresses.get(index.get()));
+ }
+ }
+ index.getAndIncrement();
+ return ipPort;
+ }
+
+ private List<String> getAvailableZoneIpPorts() {
+ List<String> results = new ArrayList<>();
+ if (!getAvailableAddress(sameAZ).isEmpty()) {
+ results.addAll(getAvailableAddress(sameAZ));
+ } else {
+ results.addAll(getAvailableAddress(sameRegion));
+ }
+ return results;
+ }
+
+ private IpPort getDefaultIpPort() {
+ if (index.get() >= defaultIpPort.size()) {
+ index.set(0);
+ }
+ return defaultIpPort.get(index.get());
+ }
+
+ private List<String> getAvailableAddress(List<String> endpoints) {
+ List<String> result = new ArrayList<>();
+ for (String endpoint : endpoints) {
+ try {
+ if (availableIpCache.get(getUri(endpoint), () -> true)) {
+ result.add(endpoint);
+ }
+ } catch (ExecutionException e) {
+ LOGGER.error("Not expected to happen, maybe a bug.", e);
+ }
+ }
+ return result;
+ }
+
+ private String getUri(String endpoint) {
+ return StringUtils.split(endpoint, "//")[1];
+ }
+
+ private Map<String, List<String>> generateZoneAndRegionAddress(String key) {
+ InstanceCache KieCaches = instanceCacheManager
+ .getOrCreate(REGISTRY_APP_ID, key, DefinitionConst.VERSION_RULE_LATEST);
+ List<CacheEndpoint> CacheEndpoints = new ArrayList<>();
+ if (REGISTRY_SERVICE_NAME.equals(key)) {
+ CacheEndpoints = KieCaches.getOrCreateTransportMap().get(defaultTransport);
+ maxRetryTimes = CacheEndpoints.size();
+ } else {
+ if (KieCaches.getInstanceMap().size() <= 0) {
+ return null;
+ }
+ CacheEndpoints = KieCaches.getOrCreateTransportMap().get(defaultTransport);
+ }
+ Map<String, List<String>> zoneAndRegion = new HashMap<>();
+ dataCenterInfo = findRegion(CacheEndpoints);
+
+ List<String> sameZone = new ArrayList<>();
+ List<String> sameRegion = new ArrayList<>();
+ for (CacheEndpoint cacheEndpoint : CacheEndpoints) {
+ if (regionAndAZMatch(dataCenterInfo, cacheEndpoint.getInstance())) {
+ sameZone.add(cacheEndpoint.getEndpoint());
+ } else {
+ sameRegion.add(cacheEndpoint.getEndpoint());
+ }
+ }
+ zoneAndRegion.put("sameZone", sameZone);
+ zoneAndRegion.put("sameRegion", sameRegion);
+ return zoneAndRegion;
+ }
+
+ private DataCenterInfo findRegion(List<CacheEndpoint> CacheEndpoints) {
+ MicroserviceInstance myself = RegistrationManager.INSTANCE.getMicroserviceInstance();
+ if (myself.getDataCenterInfo() == null) {
+ return null;
+ }
Review comment:
It has been sub installed in the addressmanager logic. Considering that this module is not coupled with the client in the future, the public module incorporated into HTTP common will not be considered here.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790092219
##########
File path: service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/client/IpPortManager.java
##########
@@ -75,47 +119,202 @@ public IpPortManager(ServiceRegistryConfig serviceRegistryConfig) {
currentAvailableIndex = new AtomicInteger(initialIndex);
LOGGER.info("Initial service center address is {}", getAvailableAddress());
maxRetryTimes = defaultIpPort.size();
+ ServiceCenterEventBus.getEventBus().register(this);
}
// we have to do this operation after the first time setup has already done
public void initAutoDiscovery() {
if (!autoDiscoveryInited && this.serviceRegistryConfig.isRegistryAutoDiscovery()) {
- InstanceCache cache = instanceCacheManager.getOrCreate(REGISTRY_APP_ID,
- REGISTRY_SERVICE_NAME,
- DefinitionConst.VERSION_RULE_LATEST);
- if (cache.getInstanceMap().size() > 0) {
- setAutoDiscoveryInited(true);
- } else {
- setAutoDiscoveryInited(false);
+ for (Type type : Type.values()) {
+ InitEndPoint(type.name());
}
}
}
- public IpPort getAvailableAddress() {
- return getAvailableAddress(currentAvailableIndex.incrementAndGet());
+ private void InitEndPoint(String typeName) {
+ Map<String, List<String>> zoneAndRegion = generateZoneAndRegionAddress(typeName);
+ if (zoneAndRegion == null) {
+ return;
+ }
+ if (typeName.equals(REGISTRY_SERVICE_NAME)) {
+ setAutoDiscoveryInited(true);
+ sameAZ.addAll(zoneAndRegion.get("sameZone"));
+ sameRegion.addAll(zoneAndRegion.get("sameRegion"));
+ }
+ CommonEventManager.post(new RefreshEndpointEvent(zoneAndRegion, typeName));
}
- private IpPort getAvailableAddress(int index) {
- if (index < defaultIpPort.size()) {
- return defaultIpPort.get(index);
+ @Subscribe
+ public void onMicroserviceCacheRefreshed(MicroserviceCacheRefreshedEvent event) {
+ List<MicroserviceCache> microserviceCaches = event.getMicroserviceCaches();
+ if (null == microserviceCaches || microserviceCaches.isEmpty()) {
+ return;
}
- List<CacheEndpoint> endpoints = getDiscoveredIpPort();
- if (endpoints == null || (index >= defaultIpPort.size() + endpoints.size())) {
- currentAvailableIndex.set(0);
- return defaultIpPort.get(0);
+
+ for (MicroserviceCache microserviceCache : microserviceCaches) {
+ if (microserviceCache.getKey().toString().equals(SC_KEY)) {
+ refreshEndPoints(microserviceCache, REGISTRY_SERVICE_NAME);
+ }
+ if (microserviceCache.getKey().toString().equals(CC_KEY)) {
+ refreshEndPoints(microserviceCache, KIE_NAME);
+ }
+ if (microserviceCache.getKey().toString().equals(KIE_KEY)) {
+ refreshEndPoints(microserviceCache, CONFIG_CENTER_NAME);
+ }
+ if (microserviceCache.getKey().toString().equals(MONITORING_KEY)) {
+ refreshEndPoints(microserviceCache, CSE_MONITORING_NAME);
+ }
}
- maxRetryTimes = defaultIpPort.size() + endpoints.size();
- CacheEndpoint nextEndpoint = endpoints.get(index - defaultIpPort.size());
- return new URIEndpointObject(nextEndpoint.getEndpoint());
}
- private List<CacheEndpoint> getDiscoveredIpPort() {
- if (!autoDiscoveryInited || !this.serviceRegistryConfig.isRegistryAutoDiscovery()) {
- return null;
+ private void refreshEndPoints(MicroserviceCache microserviceCache, String name) {
+ Map<String, List<String>> zoneAndRegion = refreshEndPoint(microserviceCache);
+ if (name.equals(REGISTRY_SERVICE_NAME)) {
+ sameAZ = zoneAndRegion.get("sameZone");
+ sameRegion = zoneAndRegion.get("sameRegion");
}
+ CommonEventManager.post(new RefreshEndpointEvent(zoneAndRegion, name));
+ }
+
+ private Map<String, List<String>> refreshEndPoint(MicroserviceCache microserviceCache) {
+ List<String> sameZone = new ArrayList<>();
+ List<String> sameRegion = new ArrayList<>();
+ Map<String, List<String>> zoneAndRegion = new HashMap<>();
+
+ List<MicroserviceInstance> microserviceCacheInstances = microserviceCache.getInstances();
+
+ microserviceCacheInstances.forEach(microserviceInstance -> {
+ String endPoint = microserviceInstance.getEndpoints().get(0);
+ availableIpCache.put(getUri(endPoint), true);
+ if (regionAndAZMatch(dataCenterInfo, microserviceInstance)) {
+ sameZone.add(endPoint);
+ } else {
+ sameRegion.add(endPoint);
+ }
+ });
+ zoneAndRegion.put("sameZone", sameZone);
+ zoneAndRegion.put("sameRegion", sameRegion);
+ return zoneAndRegion;
+ }
+
+ public IpPort getAvailableAddress() {
+ return getAvailableIpPort();
+ }
+
+ private List<CacheEndpoint> getDiscoveredIpPort() {
InstanceCache instanceCache = instanceCacheManager.getOrCreate(REGISTRY_APP_ID,
REGISTRY_SERVICE_NAME,
DefinitionConst.VERSION_RULE_LATEST);
return instanceCache.getOrCreateTransportMap().get(defaultTransport);
}
+
+ private IpPort getAvailableIpPort() {
+ IpPort ipPort = null;
+ if (!autoDiscoveryInited) {
+ ipPort = getDefaultIpPort();
+ } else {
+ List<String> addresses = getAvailableZoneIpPorts();
+ if (addresses.isEmpty()) {
+ ipPort = getDefaultIpPort();
+ } else {
+ if (index.get() >= addresses.size()) {
+ index.set(0);
+ }
+ ipPort = new URIEndpointObject(addresses.get(index.get()));
+ }
+ }
+ index.getAndIncrement();
+ return ipPort;
+ }
+
+ private List<String> getAvailableZoneIpPorts() {
+ List<String> results = new ArrayList<>();
+ if (!getAvailableAddress(sameAZ).isEmpty()) {
+ results.addAll(getAvailableAddress(sameAZ));
+ } else {
+ results.addAll(getAvailableAddress(sameRegion));
+ }
+ return results;
+ }
+
+ private IpPort getDefaultIpPort() {
+ if (index.get() >= defaultIpPort.size()) {
+ index.set(0);
+ }
+ return defaultIpPort.get(index.get());
+ }
+
+ private List<String> getAvailableAddress(List<String> endpoints) {
+ List<String> result = new ArrayList<>();
+ for (String endpoint : endpoints) {
+ try {
+ if (availableIpCache.get(getUri(endpoint), () -> true)) {
+ result.add(endpoint);
+ }
+ } catch (ExecutionException e) {
+ LOGGER.error("Not expected to happen, maybe a bug.", e);
+ }
+ }
+ return result;
+ }
+
+ private String getUri(String endpoint) {
+ return StringUtils.split(endpoint, "//")[1];
+ }
+
+ private Map<String, List<String>> generateZoneAndRegionAddress(String key) {
+ InstanceCache KieCaches = instanceCacheManager
+ .getOrCreate(REGISTRY_APP_ID, key, DefinitionConst.VERSION_RULE_LATEST);
+ List<CacheEndpoint> CacheEndpoints = new ArrayList<>();
+ if (REGISTRY_SERVICE_NAME.equals(key)) {
+ CacheEndpoints = KieCaches.getOrCreateTransportMap().get(defaultTransport);
+ maxRetryTimes = CacheEndpoints.size();
+ } else {
+ if (KieCaches.getInstanceMap().size() <= 0) {
+ return null;
+ }
+ CacheEndpoints = KieCaches.getOrCreateTransportMap().get(defaultTransport);
+ }
+ Map<String, List<String>> zoneAndRegion = new HashMap<>();
+ dataCenterInfo = findRegion(CacheEndpoints);
+
+ List<String> sameZone = new ArrayList<>();
+ List<String> sameRegion = new ArrayList<>();
+ for (CacheEndpoint cacheEndpoint : CacheEndpoints) {
+ if (regionAndAZMatch(dataCenterInfo, cacheEndpoint.getInstance())) {
+ sameZone.add(cacheEndpoint.getEndpoint());
+ } else {
+ sameRegion.add(cacheEndpoint.getEndpoint());
+ }
+ }
+ zoneAndRegion.put("sameZone", sameZone);
+ zoneAndRegion.put("sameRegion", sameRegion);
+ return zoneAndRegion;
+ }
+
+ private DataCenterInfo findRegion(List<CacheEndpoint> CacheEndpoints) {
+ MicroserviceInstance myself = RegistrationManager.INSTANCE.getMicroserviceInstance();
+ if (myself.getDataCenterInfo() == null) {
+ return null;
+ }
Review comment:
These logic can hide in AddressManager
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790091873
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/common/EndpointAddress.java
##########
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+
+public class EndpointAddress {
Review comment:
`EndpointAddress` is stand for a address information, where has address, dc, az information.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790092086
##########
File path: clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/ServiceCenterDiscovery.java
##########
@@ -147,6 +148,18 @@ public void onPullInstanceEvent(PullInstanceEvent event) {
pullAllInstance();
}
+ public List<MicroserviceInstance> findServiceInstance(String appId, String serviceName, String versionRule) {
Review comment:
This method never used.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790359638
##########
File path: foundations/foundation-registry/src/main/java/org/apache/servicecomb/registry/api/registry/MicroserviceInstance.java
##########
@@ -212,17 +212,17 @@ public static MicroserviceInstance createFromDefinition(Configuration configurat
}
private static void loadDataCenterInfo(MicroserviceInstance microserviceInstance) {
- String dataCenterName = DynamicPropertyFactory.getInstance()
- .getStringProperty("servicecomb.datacenter.name", null)
+ String availableZone = DynamicPropertyFactory.getInstance()
Review comment:
Why modify this method ?
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790122043
##########
File path: clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/event/CommonEventManager.java
##########
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.http.client.event;
+
+import com.google.common.eventbus.EventBus;
+
+/**
+ * EventManager for chassis events
+ *
+ */
+public class CommonEventManager {
Review comment:
Keep this public event class first, because it involves the inconsistency of multiple events after unification, and the event logic of the service center client module needs to be modified. To ensure reliability, retain this logic for the time being.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790091682
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterManager.java
##########
@@ -77,10 +79,15 @@ public void execute() {
ConfigurationChangedEvent event = ConfigurationChangedEvent
.createIncremental(configConverter.getCurrentData(), lastData);
eventBus.post(event);
+ retryTimes=0;
}
startTask(new BackOffSleepTask(POLL_INTERVAL, new PollConfigurationTask(0)));
} catch (Exception e) {
LOGGER.error("get configurations from ConfigCenter failed, and will try again.", e);
+ ++retryTimes;
+ if(retryTimes < 3) {
+ startTask(new BackOffSleepTask(0, new PollConfigurationTask(0)));
+ }
Review comment:
Do not need this code.
`startTask(new BackOffSleepTask(failCount + 1, new PollConfigurationTask(failCount + 1)))` already doing retry.
--
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: commits-unsubscribe@servicecomb.apache.org
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 #2691: [SCB-2361] Support SC dual cluster multi active mode
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2691:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2691#discussion_r790358314
##########
File path: clients/config-center-client/src/main/java/org/apache/servicecomb/config/center/client/ConfigCenterClient.java
##########
@@ -65,8 +65,9 @@ public QueryConfigurationsResponse queryConfigurations(QueryConfigurationsReques
Map<String, Object> configurations = new HashMap<>();
String uri = null;
+ String currentAddress = addressManager.address();
try {
- uri = addressManager.address() + "/configuration/items?dimensionsInfo="
+ uri = currentAddress + "/configuration/items?dimensionsInfo="
Review comment:
Do not need modify
##########
File path: clients/config-kie-client/src/main/java/org/apache/servicecomb/config/kie/client/KieClient.java
##########
@@ -52,6 +52,8 @@
protected String revision = "0";
+ private String currentAddress = "";
Review comment:
delete
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org