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
priority: release references to child policies which are removed #5682
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,10 @@ func (b *priorityBalancer) handleChildStateUpdate(childName string, s balancer.S | |
b.logger.Warningf("priority: child balancer not found for child %v", childName) | ||
return | ||
} | ||
if !child.started { | ||
b.logger.Warningf("priority: ignoring update from child %q which is not in started state: %+v", childName, s) | ||
return | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe at least an info log about receiving an update from a child we stopped? It's a race but could be of interest. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I added it as a warning log because: |
||
} | ||
child.state = s | ||
|
||
// We start/stop the init timer of this child based on the new connectivity | ||
|
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.
In
internal
I'm probably fine with this, but be cautious about putting TODOs in godoc strings.