You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Lubaoshuai (via GitHub)" <gi...@apache.org> on 2026/09/12 17:08:14 UTC
[PR] fix(rpc): release concurrent count when downstream throws LIMIT_EXCEEDED [dubbo]
Lubaoshuai opened a new pull request, #16461:
URL: https://github.com/apache/dubbo/pull/16461
Fixes #16455
## What
`ActiveLimitFilter` and `ExecuteLimitFilter` skipped `RpcStatus.endCount()` whenever `onError` received a `LIMIT_EXCEEDED` `RpcException`. That skip is only correct when the filter itself rejected admission (in that case `beginCount` never succeeded, so there is nothing to release).
When admission **succeeded** and a downstream invoker (client side, `ActiveLimitFilter`) or the business implementation (provider side, `ExecuteLimitFilter`) threw `LIMIT_EXCEEDED` — or a response future completed exceptionally with it — the count taken in `invoke()` leaked. Repeated occurrences exhaust the `actives`/`executes` slots and every subsequent invocation times out until restart.
## Fix
Mark the invocation (`invocation.put(...COUNTED, true)`) as soon as `beginCount` succeeds. `onError` now only skips the release when a `LIMIT_EXCEEDED` arrives **without** that marker (i.e. the filter's own rejection path); every other error — and downstream limit exceptions — release the count as before.
## Tests
Two regression cases per filter in `dubbo-rpc-api`:
- downstream/business `LIMIT_EXCEEDED` after successful admission → the slot is released (`active == 0`); previously it leaked,
- admission rejected by the filter itself → the concurrent count is untouched (no double release).
`ActiveLimitFilterTest` (9) and `ExecuteLimitFilterTest` (6) all pass.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] fix(rpc): release concurrent count when downstream throws LIMIT_EXCEEDED [dubbo]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #16461:
URL: https://github.com/apache/dubbo/pull/16461#issuecomment-5654541285
## [Codecov](https://app.codecov.io/gh/apache/dubbo/pull/16461?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `4 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 32.26%. Comparing base ([`dab47b7`](https://app.codecov.io/gh/apache/dubbo/commit/dab47b78434ae36957c196c65c0c805fc36b7f66?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e836c66`](https://app.codecov.io/gh/apache/dubbo/commit/e836c66941eb734ecfd341135c9d04746e4fc3f0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo/pull/16461?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java](https://app.codecov.io/gh/apache/dubbo/pull/16461?src=pr&el=tree&filepath=dubbo-rpc%2Fdubbo-rpc-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdubbo%2Frpc%2Ffilter%2FActiveLimitFilter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9maWx0ZXIvQWN0aXZlTGltaXRGaWx0ZXIuamF2YQ==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo/pull/16461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...rg/apache/dubbo/rpc/filter/ExecuteLimitFilter.java](https://app.codecov.io/gh/apache/dubbo/pull/16461?src=pr&el=tree&filepath=dubbo-rpc%2Fdubbo-rpc-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdubbo%2Frpc%2Ffilter%2FExecuteLimitFilter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9maWx0ZXIvRXhlY3V0ZUxpbWl0RmlsdGVyLmphdmE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/dubbo/pull/16461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (dab47b7) and HEAD (e836c66). Click for more details.
>
> <details><summary>HEAD has 7 uploads less than BASE</summary>
>
>| Flag | BASE (dab47b7) | HEAD (e836c66) |
>|------|------|------|
>|unit-tests-java17|1|0|
>|unit-tests-java8|1|0|
>|integration-tests-java8|1|0|
>|integration-tests-java21|1|0|
>|unit-tests-java11|1|0|
>|unit-tests-java25|1|0|
>|unit-tests-java21|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 3.3 #16461 +/- ##
=============================================
- Coverage 60.91% 32.26% -28.66%
- Complexity 15 10245 +10230
=============================================
Files 1953 1952 -1
Lines 89271 89251 -20
Branches 13473 13389 -84
=============================================
- Hits 54383 28794 -25589
- Misses 29309 56229 +26920
+ Partials 5579 4228 -1351
```
| [Flag](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [samples-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.21% <0.00%> (+0.04%)` | :arrow_up: |
| [samples-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `29.82% <0.00%> (-0.01%)` | :arrow_down: |
| [unit-tests-java11](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java17](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java25](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16461/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo/pull/16461?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org