clusterimpl: update picker synchronously upon receipt of configuration update
easwars opened this issue · comments
Easwar Swaminathan commented
#5469 recommends an audit of existing LB policies to ensure that they update their pickers synchronously upon receipt of a configuration update.
xds_cluster_impl_experimental
does not update its picker synchronously.
- Configuration updates are handled here:
- In the above function, the LB policy
- initially checks for some error conditions
- applies new load reporting configuration, if any
- switches to a new child policy, if the child policy name has changed
- pushes the newly received load balancer configuration onto a channel here:
- and returns from
UpdateClientConnState
- The newly received configuration update is processed here asynchronously:
- And a new picker is pushed upwards here:
This needs to be changed to return a picker synchronously upon receipt of a configuration update.
Abhishek Ranjan commented
@easwars what's the need of putting the new lb config to the channel and processing it asynchronously in run method, why can't we just update it there itself and also update the picker below that?