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

cds: update picker synchronously upon receipt of configuration update #7211

Open
easwars opened this issue May 7, 2024 · 0 comments
Open
Assignees

Comments

@easwars
Copy link
Contributor

easwars commented May 7, 2024

#5469 recommends an audit of existing LB policies to ensure that they update their pickers synchronously upon receipt of a configuration update.

cds_experimental does not update its picker synchronously.

  • Configuration updates are handled here:
    func (b *cdsBalancer) UpdateClientConnState(state balancer.ClientConnState) error {
  • In the above function, the LB policy
    • initially checks for some error conditions
    • returns early if the cluster name in the configuration has not changed (the cluster name is the only field in its configuration currently)
    • if the cluster name has changed
      • schedules a serializer callback in a blocking fashion to create a new watcher for the cluster name:
        ok = b.serializer.Schedule(func(context.Context) {
        • if the new cluster turns out to be an aggregate cluster, more watches will be registered
  • Anyways, at the end of the UpdateClientConnState , it does not return a picker inline
    • It does not even push the child policy configuration inline, because that has to wait for the cluster graph to be resolved completely

This needs fixing in at least a few places, and we need answers for these:

  • Should the cds LB policy return a picker at build time? It currently does not.
  • Should the cds LB policy return an erroring picker when cluster graph resolution is incomplete? It currently does not.
@aranjans aranjans self-assigned this May 8, 2024
@dfawley dfawley added the P2 label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants