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

Fix some bugs in xds flow control #1725

Merged

Conversation

hanbingleixue
Copy link
Collaborator

@hanbingleixue hanbingleixue commented Jan 2, 2025

What type of PR is this?

Bug

What this PR does / why we need it?

Fix the issue of xds flow control function test,The following test questions are included:
1、OKHTTP error injection failure
2、The xDS flow control instance circuit breaker function does not take effect When the number of failures reaches the threshold,
3、The request circuit breaker function of the flow control plug-in xDS flow control function does not take effect.
4、The xDS flow control function of the flow control plugin does not take effect when the httpurlconnection retries.
5、If the xDS flow control capability of the flow control plug-in is enabled and the xDS flow control rule is not configured, the service fails to be invoked.
6、The xDS flow control server fails to limit the traffic.

Which issue(s) this PR fixes?

Fixes #1724 #1515

Does this PR introduce a user-facing change?

No

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 Jan 2, 2025

Codecov Report

Attention: Patch coverage is 6.03448% with 109 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lowcontrol/common/handler/retry/AbstractRetry.java 0.00% 29 Missing ⚠️
...nt/HttpUrlConnectionResponseStreamInterceptor.java 0.00% 24 Missing ⚠️
...nt/flowcontrol/common/util/XdsThreadLocalUtil.java 16.66% 10 Missing ⚠️
.../flowcontrol/AbstractXdsHttpClientInterceptor.java 0.00% 10 Missing ⚠️
...client/HttpUrlConnectionDisconnectInterceptor.java 0.00% 10 Missing ⚠️
...ry/client/HttpUrlConnectionConnectInterceptor.java 0.00% 7 Missing ⚠️
...ment/service/xds/utils/RdsProtocolTransformer.java 0.00% 1 Missing and 1 partial ⚠️
...ermant/flowcontrol/common/util/XdsRouterUtils.java 33.33% 2 Missing ⚠️
...l/common/xds/circuit/XdsCircuitBreakerManager.java 0.00% 1 Missing and 1 partial ⚠️
...control/retry/client/OkHttp3ClientInterceptor.java 0.00% 2 Missing ⚠️
... and 7 more
Flag Coverage Δ Complexity Δ
unittests 42.54% <6.03%> (-0.17%) 181.00 <0.00> (ø)

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

Files with missing lines Coverage Δ Complexity Δ
...ermant/core/service/xds/entity/XdsRetryPolicy.java 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...ermant/flowcontrol/common/handler/retry/Retry.java 100.00% <ø> (ø) 0.00 <0.00> (ø)
...wcontrol/retry/AlibabaDubboInvokerInterceptor.java 49.47% <ø> (ø) 0.00 <0.00> (ø)
...owcontrol/retry/ApacheDubboInvokerInterceptor.java 46.46% <ø> (ø) 0.00 <0.00> (ø)
...trol/retry/cluster/AlibabaDubboClusterInvoker.java 56.75% <ø> (ø) 0.00 <0.00> (ø)
...ntrol/retry/cluster/ApacheDubboClusterInvoker.java 1.28% <ø> (ø) 0.00 <0.00> (ø)
...wcontrol/retry/client/HttpClient4xInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...lient/OkHttpClientInterceptorChainInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...chain/handler/XdsBusinessServerRequestHandler.java 21.05% <50.00%> (+4.38%) 0.00 <0.00> (ø)
...ment/service/xds/utils/RdsProtocolTransformer.java 39.90% <0.00%> (-0.30%) 0.00 <0.00> (ø)
... and 13 more

... and 29 files with indirect coverage changes

@lilai23 lilai23 changed the title Fix the issue of xds flow control function test Fix some bugs in xds flow control Jan 2, 2025
@hanbingleixue hanbingleixue force-pushed the xds-flowcontrol-service-1 branch 6 times, most recently from 1a9348e to 2d8792b Compare January 3, 2025 05:03
daizhenyu
daizhenyu previously approved these changes Jan 3, 2025
@Sherlockhan Sherlockhan merged commit ecdfb43 into sermant-io:develop Jan 3, 2025
300 checks passed
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.

Fix the issue of xds flow control function test
4 participants