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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
