-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
rls: suppress picker updates from children when handling config updates #5539
Conversation
balancer/rls/balancer_test.go
Outdated
// update is being processed by RLS LB policy and its child policies. | ||
// | ||
// The test uses a wrapping balancer as the top-level LB policy on the channel. | ||
// The wrapping balancing wraps an RLS LB policy as a child policy and forwards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
balancer*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
b.inhibitPickerUpdates = false | ||
b.sendNewPickerLocked() | ||
close(update.done) | ||
b.stateMu.Unlock() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defensive programming: default: logger.Errorf("%T", update)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
balancer/rls/balancer.go
Outdated
} | ||
|
||
type connectivityStateCh struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we find a better name? controlChannelReady
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Summary of changes:
run()
goroutine.UpdateClientConnState()
UpdateState()
run()
goroutine.SendNewPickerLocked()
UpdateClientConnState
), a new picker is built but is not pushed up.What these change means is that when the RLS LB policy is handling a config update from its parent, no picker updates will be pushed up. This includes picker updates caused by events such as RLS response, cache timer expiry, backoff timer expiry etc.
Fixes #5211
RELEASE NOTES: n/a