IT-Althusser commented on PR #7802:
URL: https://github.com/apache/shenyu/pull/7802#issuecomment-6260309172

   Thanks for the detailed review. You were right that the previous early 
return prevented an OPEN upstream from recovering while another upstream under 
the same selector remained CLOSED.
   
   I adopted the per-upstream probe attempt from your suggestion, while keeping 
an acquired probe exclusive to the recovering upstream. The updated behavior is:
   
   - Each upstream is checked in a single pass.
   - CLOSED upstreams are added to the normal candidate list.
   - A blocked upstream can acquire a half-open probe.
   - If a probe is acquired, that upstream is returned as a singleton 
candidate, ensuring that the request reaches the recovering upstream and its 
outcome is recorded.
   - If no probe is acquired, the CLOSED upstreams are returned as usual.
   
   I also preserved `SPECIFY_DOMAIN` behavior. The specified upstream is 
preferred for probe acquisition. If it is unavailable and no CLOSED upstream is 
available, an eligible upstream may be selected as a fallback probe.
   
   Cancellation of a request that actually acquired the half-open probe now 
reopens the corresponding breaker, preventing it from remaining stuck in 
`HALF_OPEN`. Cancellation of an ordinary CLOSED request does not change the 
breaker state.
   
   Retry filtering still uses `isRequestAllowed` only, so a retry does not 
consume a second half-open probe.
   
   Regression coverage includes:
   
   - recovery with a healthy sibling upstream;
   - exclusive routing of an acquired probe;
   - specified-domain routing and fallback;
   - reopening after probe cancellation;
   - preserving the CLOSED state after ordinary request cancellation.
   
   Validation:
   
   - `DividePluginCircuitBreakerTest`: 9/9 passed
   - `UpstreamCircuitBreakerTest`: 14/14 passed
   - `DividePluginTest`: 12/12 passed
   - Checkstyle: 0 violations
   - `git diff --check`: passed
   
   Could you please take another look when you have a chance?
   


-- 
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]

Reply via email to