darion-yaphet opened a new pull request, #3688:
URL: https://github.com/apache/brpc/pull/3688

   ### What problem does this PR solve?
   
   Issue Number: Related to #3275
   
   Problem Summary:
   
   When `max_retry=0`, or earlier retries have exhausted the budget, the backup 
timer can terminate an in-flight RPC with `EBACKUPREQUEST` before its overall 
timeout.
   
   For example, an RPC configured with a 10ms timeout and a 2ms backup 
threshold may fail at approximately 2ms even though the original request could 
still succeed.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Skip the backup request when no retry budget remains, while keeping the 
current request in flight.
   - Restore the original overall deadline before returning from the backup 
event handler.
   - Add regression coverage for zero and exhausted retry budgets, 
naming-service and direct channels, synchronous and asynchronous calls, and 
finite and infinite timeouts.
   - Document the behavior in both client guides.
   
   Side effects:
   
   - Performance effects: No additional request is sent when the retry budget 
is exhausted. Performance benchmarks were not run.
   - Breaking backward compatibility: No public API or ABI changes. Calls that 
previously failed prematurely now wait for completion or the overall timeout.
   
   ---
   ### Check List:
   
   - [x] Built `brpc_channel_unittest` successfully.
   - [x] Passed all 89 tests in `brpc_channel_unittest` on macOS.
   - [x] Verified the new regression test fails before the fix and passes 
afterward across 24 configuration combinations.
   - [x] Updated the Chinese and English client guides.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
   


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

Reply via email to