Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support dubbo3.x rateLimiting/circuitBreaker #1747

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chengyouling
Copy link
Collaborator

What type of PR is this?

Feature

What this PR does / why we need it?

Adapt to the increasing use of dubbo3.x services in the market.

Which issue(s) this PR fixes?

Fixes #1746

Does this PR introduce a user-facing change?

support dubbo3.x rateLimiting/circuitBreaker

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lowcontrol/common/util/DubboAttachmentsHelper.java 62.50% 1 Missing and 2 partials ⚠️
Flag Coverage Δ Complexity Δ
unittests 27.70% <62.50%> (+<0.01%) 156.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
...lowcontrol/common/util/DubboAttachmentsHelper.java 63.63% <62.50%> (-6.96%) 0.00 <0.00> (ø)

... and 1 file with indirect coverage changes

@chengyouling chengyouling force-pushed the develop-rate branch 12 times, most recently from e55b08f to 81f34b1 Compare February 24, 2025 11:32
Comment on lines +59 to +60
mv -f sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/ProviderApplication.java.banck sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/ProviderApplication.java
mv -f sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/Dubbo3ProviderApplication.java sermant-integration-tests/dubbo-test/dubbo-2-7-integration-provider/src/main/java/io/sermant/integration/Dubbo3ProviderApplication.java.banck
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does Dubbo3ProviderApplication.java.banck mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To load the rule file only in the dubbo3 flow control scenario

Comment on lines 26 to 30

/**
* 流控全局异常处理
*
* @author chengyouling
Copy link
Collaborator

@lilai23 lilai23 Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file exists in consumer. What is the usage here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test the limiting and circuit breaker capabilities of the server in the dubbo scenario

Comment on lines +1 to +9
servicecomb:
matchGroup:
demo-lb: |
matches:
- serviceName: dubbo-integration-provider
demo-fault-null: |
matches:
- apiPath:
exact: "io.sermant.integration.service.FlowControlService.faultNull"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file exists in consumer. What is the usage here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test the limiting and circuit breaker capabilities of the server in the dubbo scenario

Comment on lines +38 to +49
@EnabledIfEnvironmentVariable(named = "TEST_TYPE", matches = "dubbo3-flow")
public class Dubbo3FlowControlTest {
private static final String BASE_URL = "http://127.0.0.1:28020/consumer/flow/";
private static final int RATE_LIMITING_REQUEST_COUNT = 10;
private static final int BREAKER_REQUEST_COUNT = 10;
private static final String BREAKER_MSG = "is OPEN and does not permit further calls";
private static final String RATE_LIMITING_MSG = "Rate Limited";

/**
* 限流测试
*/
@Test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why copy this class and delete some test case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, adapted server governance capability first. The client retry and load balancing capabilities are not adapted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support dubbo3.x rateLimiting/circuitBreaker
2 participants