Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dualstack: Move resolver re-resolution out of subconn and into pickfirst #7534

Open
arjan-bal opened this issue Aug 19, 2024 · 1 comment
Open
Assignees
Labels
Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. P2 Type: Internal Cleanup Refactors, etc

Comments

@arjan-bal
Copy link
Contributor

Presently, addrConn is requesting a re-resolution before reporting TRANSIENT_FAILURE once all the addresses have been tried:

grpc-go/clientconn.go

Lines 1256 to 1266 in 3cb3342

if err := ac.tryAllAddrs(acCtx, addrs, connectDeadline); err != nil {
ac.cc.resolveNow(resolver.ResolveNowOptions{})
ac.mu.Lock()
if acCtx.Err() != nil {
// addrConn was torn down.
ac.mu.Unlock()
return
}
// After exhausting all addresses, the addrConn enters
// TRANSIENT_FAILURE.
ac.updateConnectivityState(connectivity.TransientFailure, err)

With the dualstack changes for moving pickfirst logic from the subchannel to the new pickfirst LB policy, there will be one address per subchannel and the re-resolution should happen only once all the subchannels have reported TRANSIENT_FAILURE once. Subsequent re-resolutions should happen after seeing |subchannels| TRANSIENT_FAILUREs.

@arjan-bal arjan-bal added the Type: Internal Cleanup Refactors, etc label Aug 19, 2024
@arjan-bal arjan-bal self-assigned this Aug 19, 2024
@arjan-bal
Copy link
Contributor Author

I'll make this once all petiole policies are delegating to pick_first to avoid breaking them.

@dfawley dfawley added the P2 label Aug 20, 2024
@purnesh42H purnesh42H added the Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. P2 Type: Internal Cleanup Refactors, etc
Projects
None yet
Development

No branches or pull requests

3 participants