grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

xds: Priority policy restarts timer on CONNECTING->CONNECTING transition

Open dfawley opened this issue 5 months ago • 2 comments

If the priority policy's timer for a child (the init timer) expires -- started here:

https://github.com/grpc/grpc-go/blob/0ebea3ebca8720be615d2c2e270a2c55ebd0b818/xds/internal/balancer/priority/balancer_child.go#L105

If the child is still CONNECTING and then it produces a new CONNECTING picker, this code will restart it:

https://github.com/grpc/grpc-go/blob/0ebea3ebca8720be615d2c2e270a2c55ebd0b818/xds/internal/balancer/priority/balancer_priority.go#L201

This should be able to be fixed by checking if the old state was also CONNECTING, and avoiding starting the timer if so.

dfawley avatar Aug 15 '25 21:08 dfawley

assign this issue to me pls

i think we can check the state of child when calling init timer.

hugehoo avatar Oct 04 '25 06:10 hugehoo

I'm picking this one up as I'm going to be looking into the priority policy for the connection churn issue anyways.

easwars avatar Nov 12 '25 06:11 easwars