Skip to content

grpc/load_balancing: Sticky TF for pick_first - #3028

Open
nathanielford wants to merge 1 commit into
grpc:masterfrom
nathanielford:fix/pick-first-sticky-transient-failure
Open

nathanielford wants to merge 1 commit into
grpc:masterfrom
nathanielford:fix/pick-first-sticky-transient-failure

Conversation

@nathanielford

@nathanielford nathanielford commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Once pick_first reports TRANSIENT_FAILURE, it should keep reporting it until a subchannel becomes READY (sticky TRANSIENT_FAILURE, gRFC A62). Instead, when a new address list starts a connection attempt, pick_first reports CONNECTING. 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 reporting TRANSIENT_FAILURE instead of CONNECTING. The attempt still starts immediately.

Test: test_pick_first_resolver_update_in_transient_failure_starts_connecting_immediately. After a resolver error puts the policy in TRANSIENT_FAILURE, a valid address list starts connecting at once without reporting CONNECTING, and the policy reports READY once a subchannel connects. The test fails without the fix.

Notes

Resolved on #2784.

@nathanielford nathanielford changed the title Sticky TF grpc/load_balancing: Sticky TF for pick_first Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants