Repository navigation
fix(brpc): Skip backup when retry budget is exhausted - #3688
Open
darion-yaphet wants to merge 1 commit into
Open
darion-yaphet wants to merge 1 commit into
darion-yaphet wants to merge 1 commit into
Conversation
Keep the in-flight RPC alive when the backup timer fires without remaining retry budget. Restore the original overall deadline instead of terminating with EBACKUPREQUEST. Cover zero and exhausted retry budgets across naming-service and direct channels, synchronous and asynchronous calls, and finite and infinite timeouts. Document the behavior in both client guides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withEBACKUPREQUESTbefore 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:
Side effects:
Check List:
brpc_channel_unittestsuccessfully.brpc_channel_unitteston macOS.