Repository navigation
grpc/load_balancing: Sticky TF for pick_first - #3028
Open
nathanielford wants to merge 1 commit into
Open
nathanielford wants to merge 1 commit into
nathanielford wants to merge 1 commit into
Conversation
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.
Motivation
Once
pick_firstreportsTRANSIENT_FAILURE, it should keep reporting it until a subchannel becomes READY (stickyTRANSIENT_FAILURE, gRFC A62). Instead, when a new address list starts a connection attempt, pick_first reportsCONNECTING. RPCs that were failing fast start queueing instead, and the channel can switch back and forth between the two states.Solution
When a connection attempt starts while pick_first is reporting
TRANSIENT_FAILURE, keep reportingTRANSIENT_FAILUREinstead ofCONNECTING. The attempt still starts immediately.Test:
test_pick_first_resolver_update_in_transient_failure_starts_connecting_immediately. After a resolver error puts the policy inTRANSIENT_FAILURE, a valid address list starts connecting at once without reportingCONNECTING, and the policy reportsREADYonce a subchannel connects. The test fails without the fix.Notes
Resolved on #2784.