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
circuit breaking: update picker inline when there's a counter update #4212
circuit breaking: update picker inline when there's a counter update #4212
Conversation
…ne when there's a counter update Otherwise, if there's no further picker update, the new counter will never be used.
Manual interop test passed. |
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.
Just some nits.
if edsImpl.serviceRequestsCounter == nil || edsImpl.serviceRequestsCounter.ServiceName != serviceName { | ||
edsImpl.serviceRequestsCounter = client.GetServiceRequestsCounter(serviceName) | ||
updatePicker = true | ||
} | ||
if max != nil { |
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.
Do we need to check edsImpl.serviceRequestCountMax != *max
before setting updatePicker = true
?
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.
Good catch.
This is also not handling nil
properly.
Fixed
edsb.updateServiceRequestsConfig("test", &maxRequests2) | ||
|
||
// Picks with drops. | ||
dones2 := []func(){} |
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't we just use dones
here as well? Do we need dones2
?
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
Otherwise, if there's no further picker update, the new counter will never be used.
Regression caused by #4203
This is handled in
cluster_impl
, but missed ineds
.