IT-Althusser opened a new pull request, #7802: URL: https://github.com/apache/shenyu/pull/7802
## Problem When the built-in upstream circuit breaker finished its open wait window, `UpstreamCircuitBreaker.isRequestAllowed()` returned true while the state stayed OPEN. `DividePlugin.filterByCircuitBreaker()` added those upstreams to the normal allowed list and returned before `tryAcquireHalfOpenProbe()` could run. As a result, ordinary traffic was admitted during the recovery window, defeating the documented single half-open probe behavior. Even an explicitly HALF_OPEN breaker kept admitting requests while the first probe had no outcome. ## Fix - `isRequestAllowed()` now grants requests only in the CLOSED state. - An OPEN breaker must be acquired through `tryAcquireHalfOpenProbe()`, which atomically transitions it to HALF_OPEN and grants exactly one probe; a failed probe re-opens the breaker and a successful probe closes it. - Updated the Javadoc to state the contract and added a regression assertion that an expired OPEN breaker still blocks ordinary requests. ## Validation - `mvn test -pl shenyu-plugin/shenyu-plugin-base -am -Dtest=UpstreamCircuitBreakerTest -DfailIfNoTests=false` — 12/12 passed. - `git diff --check` passed. - `DividePluginCircuitBreakerTest` could not run locally because Mockito cannot mock `UpstreamCacheManager`/`SelectorData` on the local Java 25 toolchain; the failure occurs in test setup, unrelated to this change. Closes #7760 -- 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]
