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/04/14 01:55:03 UTC
[GitHub] [servicecomb-java-chassis] liubao68 opened a new pull request, #2782: [SCB-2342]governance support instance error statistics and isolation
liubao68 opened a new pull request, #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782
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 closed pull request #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
liubao68 closed pull request #2782: [SCB-2342]governance support instance error statistics and isolation
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782
--
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 #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782#issuecomment-1098644053
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782?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 [#2782](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7fbcda1) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/0fb9f677cacbe3004a717dec2118cc103f53b5dc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0fb9f67) will **increase** coverage by `0.02%`.
> The diff coverage is `87.17%`.
```diff
@@ Coverage Diff @@
## master #2782 +/- ##
============================================
+ Coverage 77.26% 77.28% +0.02%
Complexity 1418 1418
============================================
Files 1614 1616 +2
Lines 43262 43299 +37
Branches 3665 3666 +1
============================================
+ Hits 33427 33465 +38
+ Misses 8303 8296 -7
- Partials 1532 1538 +6
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ervicecomb/governance/handler/BulkheadHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9oYW5kbGVyL0J1bGtoZWFkSGFuZGxlci5qYXZh) | `28.57% <ø> (ø)` | |
| [...comb/governance/handler/CircuitBreakerHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9oYW5kbGVyL0NpcmN1aXRCcmVha2VySGFuZGxlci5qYXZh) | `20.00% <ø> (ø)` | |
| [...cecomb/governance/handler/RateLimitingHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9oYW5kbGVyL1JhdGVMaW1pdGluZ0hhbmRsZXIuamF2YQ==) | `100.00% <ø> (ø)` | |
| [...e/servicecomb/governance/handler/RetryHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9oYW5kbGVyL1JldHJ5SGFuZGxlci5qYXZh) | `85.71% <ø> (ø)` | |
| [...b/governance/handler/InstanceIsolationHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9oYW5kbGVyL0luc3RhbmNlSXNvbGF0aW9uSGFuZGxlci5qYXZh) | `82.14% <82.14%> (ø)` | |
| [.../governance/handler/AbstractGovernanceHandler.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9oYW5kbGVyL0Fic3RyYWN0R292ZXJuYW5jZUhhbmRsZXIuamF2YQ==) | `95.45% <100.00%> (ø)` | |
| [...rvicecomb/governance/marker/GovernanceRequest.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9tYXJrZXIvR292ZXJuYW5jZVJlcXVlc3QuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...rnance/properties/InstanceIsolationProperties.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9wcm9wZXJ0aWVzL0luc3RhbmNlSXNvbGF0aW9uUHJvcGVydGllcy5qYXZh) | `100.00% <100.00%> (ø)` | |
| [...b/core/invocation/timeout/PassingTimeStrategy.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9pbnZvY2F0aW9uL3RpbWVvdXQvUGFzc2luZ1RpbWVTdHJhdGVneS5qYXZh) | `94.44% <0.00%> (-5.56%)` | :arrow_down: |
| [...comb/core/definition/MicroserviceVersionsMeta.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9kZWZpbml0aW9uL01pY3Jvc2VydmljZVZlcnNpb25zTWV0YS5qYXZh) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
| ... and [4 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782/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/2782?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/2782?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 [0fb9f67...7fbcda1](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2782?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] Shoothzj commented on a diff in pull request #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on code in PR #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782#discussion_r850023641
##########
governance/src/test/java/org/apache/servicecomb/governance/InstanceIsolationTest.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * 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.governance;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.servicecomb.governance.handler.InstanceIsolationHandler;
+import org.apache.servicecomb.governance.marker.GovernanceRequest;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.ConfigDataApplicationContextInitializer;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import io.github.resilience4j.circuitbreaker.CircuitBreaker;
+import io.github.resilience4j.decorators.Decorators;
+import io.github.resilience4j.decorators.Decorators.DecorateCheckedSupplier;
+
+@RunWith(SpringRunner.class)
+@ContextConfiguration(locations = "classpath:META-INF/spring/*.xml", initializers = ConfigDataApplicationContextInitializer.class)
+public class InstanceIsolationTest {
+ private InstanceIsolationHandler instanceIsolationHandler;
+
+ @Autowired
+ public void setInstanceIsolationHandler(InstanceIsolationHandler instanceIsolationHandler) {
+ this.instanceIsolationHandler = instanceIsolationHandler;
+ }
+
+ public InstanceIsolationTest() {
+ }
+
+ @Test
+ public void test_instance_isolation_work() throws Throwable {
+ AtomicInteger counter = new AtomicInteger(0);
+
+ DecorateCheckedSupplier<Object> ds = Decorators.ofCheckedSupplier(() -> {
+ int run = counter.getAndIncrement();
+ if (run == 0) {
+ return "test";
+ }
+ if (run == 1) {
+ throw new RuntimeException("test exception");
+ }
+ return "test";
+ });
+
+ DecorateCheckedSupplier<Object> ds2 = Decorators.ofCheckedSupplier(() -> "test");
+
+ GovernanceRequest request = new GovernanceRequest();
+ request.setInstanceId("instance01");
+ request.setServiceId("service01");
+
+ CircuitBreaker circuitBreaker = instanceIsolationHandler.getActuator(request);
+ ds.withCircuitBreaker(circuitBreaker);
+
+ // isolation from error
+ Assert.assertEquals("test", ds.get());
+ Assertions.assertThrows(RuntimeException.class, () -> ds.get());
+ Assertions.assertThrows(RuntimeException.class, () -> ds.get());
+ Assertions.assertThrows(RuntimeException.class, () -> ds.get());
+
+ // isolation do not influence other instances
+ GovernanceRequest request2 = new GovernanceRequest();
+ request2.setInstanceId("instance02");
+ request2.setServiceId("service01");
+
+ CircuitBreaker circuitBreaker2 = instanceIsolationHandler.getActuator(request2);
+ ds2.withCircuitBreaker(circuitBreaker2);
+
+ Assert.assertEquals("test", ds2.get());
Review Comment:
should we write new test case use junit5?
--
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 pull request #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
liubao68 commented on PR #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782#issuecomment-1098647622
@Shoothzj thanks for revies, I have fixed all your problems
--
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] Shoothzj commented on a diff in pull request #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on code in PR #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782#discussion_r850023458
##########
governance/src/main/java/org/apache/servicecomb/governance/handler/InstanceIsolationHandler.java:
##########
@@ -0,0 +1,98 @@
+/*
+ * 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.governance.handler;
+
+import java.time.Duration;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.servicecomb.governance.marker.GovernanceRequest;
+import org.apache.servicecomb.governance.policy.CircuitBreakerPolicy;
+import org.apache.servicecomb.governance.properties.InstanceIsolationProperties;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import io.github.resilience4j.circuitbreaker.CircuitBreaker;
+import io.github.resilience4j.circuitbreaker.CircuitBreakerConfig;
+import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry;
+
+@Component
+public class InstanceIsolationHandler extends AbstractGovernanceHandler<CircuitBreaker, CircuitBreakerPolicy> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CircuitBreakerHandler.class);
+
+ private static final String DEFAULT_SERVICE_NAME = "default";
+
+ private InstanceIsolationProperties instanceIsolationProperties;
+
+ @Autowired
+ public InstanceIsolationHandler(InstanceIsolationProperties instanceIsolationProperties) {
+ this.instanceIsolationProperties = instanceIsolationProperties;
+ }
+
+ @Override
+ protected String createKey(GovernanceRequest governanceRequest, CircuitBreakerPolicy policy) {
+ return "servicecomb.instanceIsolation." + governanceRequest.getInstanceId();
+ }
+
+ @Override
+ public CircuitBreakerPolicy matchPolicy(GovernanceRequest governanceRequest) {
+ if (StringUtils.isEmpty(governanceRequest.getServiceId()) || StringUtils.isEmpty(
+ governanceRequest.getInstanceId())) {
+ LOGGER.info("Isolation is not properly configured, service id or instance id is empty.");
+ return null;
+ }
+ CircuitBreakerPolicy circuitBreakerPolicy =
+ instanceIsolationProperties.getParsedEntity().get(governanceRequest.getServiceId());
+
+ if (circuitBreakerPolicy == null) {
+ return instanceIsolationProperties.getParsedEntity().get(DEFAULT_SERVICE_NAME);
+ }
+ return circuitBreakerPolicy;
+ }
+
+ @Override
+ protected CircuitBreaker createProcessor(GovernanceRequest governanceRequest, CircuitBreakerPolicy policy) {
+ return getCircuitBreaker(governanceRequest, policy);
+ }
+
+ private CircuitBreaker getCircuitBreaker(GovernanceRequest governanceRequest, CircuitBreakerPolicy policy) {
+ LOGGER.info("applying new policy: {}", policy.toString());
+
+ CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom()
+ //熔断 失败率(请求)百分比阈值
Review Comment:
should we use english instead of chinese?
--
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] Shoothzj commented on a diff in pull request #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on code in PR #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782#discussion_r850023911
##########
governance/src/main/java/org/apache/servicecomb/governance/handler/InstanceIsolationHandler.java:
##########
@@ -0,0 +1,98 @@
+/*
+ * 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.governance.handler;
+
+import java.time.Duration;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.servicecomb.governance.marker.GovernanceRequest;
+import org.apache.servicecomb.governance.policy.CircuitBreakerPolicy;
+import org.apache.servicecomb.governance.properties.InstanceIsolationProperties;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import io.github.resilience4j.circuitbreaker.CircuitBreaker;
+import io.github.resilience4j.circuitbreaker.CircuitBreakerConfig;
+import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry;
+
+@Component
+public class InstanceIsolationHandler extends AbstractGovernanceHandler<CircuitBreaker, CircuitBreakerPolicy> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CircuitBreakerHandler.class);
+
+ private static final String DEFAULT_SERVICE_NAME = "default";
+
+ private InstanceIsolationProperties instanceIsolationProperties;
+
+ @Autowired
+ public InstanceIsolationHandler(InstanceIsolationProperties instanceIsolationProperties) {
+ this.instanceIsolationProperties = instanceIsolationProperties;
+ }
+
+ @Override
+ protected String createKey(GovernanceRequest governanceRequest, CircuitBreakerPolicy policy) {
+ return "servicecomb.instanceIsolation." + governanceRequest.getInstanceId();
Review Comment:
```suggestion
return InstanceIsolationProperties.MATCH_INSTANCE_ISOLATION_KEY + governanceRequest.getInstanceId();
```
--
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] Shoothzj commented on a diff in pull request #2782: [SCB-2342]governance support instance error statistics and isolation
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on code in PR #2782:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2782#discussion_r850022913
##########
governance/src/test/resources/application.yaml:
##########
@@ -77,4 +77,10 @@ servicecomb:
wrongIngored: |
rules:
match: demo-bulkhead.xx
- maxWaitDuration: -1
\ No newline at end of file
+ maxWaitDuration: -1
+ instanceIsolation:
+ default: |
+ minimumNumberOfCalls: 2
+ slidingWindowSize: 2
+ slidingWindowType: count
+ waitDurationInOpenState: 1000
Review Comment:
we'd better add a new line on file end
--
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