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

circuit breaking: update picker inline when there's a counter update #4212

Merged
merged 2 commits into from Feb 18, 2021

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Feb 18, 2021

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 in eds.

…ne when there's a counter update

Otherwise, if there's no further picker update, the new counter will never be used.
@menghanl
Copy link
Contributor Author

Manual interop test passed.

Copy link
Contributor

@easwars easwars left a 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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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(){}
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@menghanl menghanl merged commit 26c143b into grpc:master Feb 18, 2021
@menghanl menghanl deleted the circuit_breaking_update_picker branch February 18, 2021 18:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants