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

grpclb: do not send redundant empty load reports to remote LB #3249

Merged
merged 4 commits into from
Dec 12, 2019

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Dec 11, 2019

Small refactor of tests:

  • Add a channel to remoteBalancer on which to send received stats messages
  • Change runAndGetStats to runAndCheckStats to allow for faster successful test
    runs (no longer need to sleep for one whole second per test).
  • Remove redundant leak check from runAndCheckStats, otherwise excess load
    report messages not read from the channel will result in an infinite loop.

Small refactor of tests:

- Add a channel to remoteBalancer on which to send received stats messages
- Change runAndGetStats to runAndCheckStats to allow for faster successful test
  runs (no longer need to sleep for one whole second per test).
- Remove redundant leak check from runAndCheckStats, otherwise excess load
  report messages not read from the channel will result in an infinite loop.
@dfawley dfawley added the Type: Feature New features or improvements in behavior label Dec 11, 2019
@dfawley dfawley added this to the 1.26 Release milestone Dec 11, 2019
@@ -49,6 +49,14 @@ func newRPCStats() *rpcStats {
}
}

func isZeroStats(stats *lbpb.ClientStats) bool {
return len(stats.CallsFinishedWithDrop) == 0 &&
Copy link
Contributor

Choose a reason for hiding this comment

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

All fields need to be accessed atomically

Copy link
Member Author

Choose a reason for hiding this comment

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

These are in the stats message, not in the rpcStats struct.

@dfawley dfawley merged commit 085c980 into grpc:master Dec 12, 2019
@dfawley dfawley deleted the grpclb_quash branch December 12, 2019 22:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants