zjncs opened a new pull request, #11146:
URL: https://github.com/apache/rocketmq/pull/11146

   ### Motivation
   
   `LatencyFaultToleranceImpl.detectByOneRound` only flipped 
`FaultItem.reachableFlag` from false to true. Once a broker had been marked 
reachable, a failing service detector was ignored, so `MQFaultStrategy`'s 
reachable filter kept selecting a broker that had gone down until a real send 
happened to fail against it.
   
   ### Modifications
   
   Reset the flag symmetrically when the detector reports the broker 
unreachable, so the next broker-selection round sees the failure.
   
   ### Verification
   
   Fail-before (new test, run against the unpatched code):
   
   ```
   Tests run: 3, Failures: 1, Errors: 0, Skipped: 1 -- 
LatencyFaultToleranceImplTest#testDetectByOneRoundClearsReachableFlagWhenDetectFails
   ```
   
   Pass-after:
   
   ```
   Tests run: 3, Failures: 0, Errors: 0, Skipped: 1 -- 
LatencyFaultToleranceImplTest
   ```
   


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