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

xds: report drops by circuit breaking #4171

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

menghanl
Copy link
Contributor

Those drops will be reported to store with category "". When reported via LRS,
they will only be counted in total_drops, but not in per category.

fixes #4138

Those drops will be reported to store with category "".  When reported via LRS,
they will only be counted in total_drops, but not in per category.
@menghanl menghanl requested a review from dfawley January 22, 2021 18:55
@menghanl menghanl force-pushed the circuit_breaking_drop_reporting branch 2 times, most recently from 0b5c5c0 to f063116 Compare January 22, 2021 19:39
@menghanl menghanl force-pushed the circuit_breaking_drop_reporting branch from f063116 to 7baecdd Compare January 22, 2021 19:57

// ClearCounterForTesting clears the counter for the service. Should be only
// used in tests.
func ClearCounterForTesting(serviceName string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this return an error if serviceName is not found in the map?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this doesn't matter.
Or are you suggesting that we should fail the test if this cleanup can't find the counter?

// Drops by circuit breaking are reported with empty category. They
// will be reported only in total drops, but not in per category.
if d.loadStore != nil {
d.loadStore.CallDropped("")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we report these with an empty category instead of using a category which makes it clear that these calls were dropped because of circuit-breaking?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is defined in the design doc.
And I believe the reason behind is that envoy doesn't report those with category.

if keyStr != "" {
// Skip drops without category. They are counted in total_drops, but
// not in per category. One example is drops by circuit breaking.
sd.Drops[key.(string)] = d
Copy link
Member

Choose a reason for hiding this comment

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

keyStr

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

@dfawley dfawley assigned menghanl and unassigned dfawley Jan 27, 2021
@menghanl menghanl merged commit 0bc7417 into grpc:master Jan 29, 2021
@menghanl menghanl deleted the circuit_breaking_drop_reporting branch January 29, 2021 00:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drops by circuit breaking are not reported to LRS
3 participants