-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: manage load stats for all clusters in XdsClient (v1.31.x backport) #7314
Closed
voidzcy
wants to merge
9
commits into
grpc:v1.31.x
from
voidzcy:refactor/manage_global_client_stats_backport_1_31
Closed
xds: manage load stats for all clusters in XdsClient (v1.31.x backport) #7314
voidzcy
wants to merge
9
commits into
grpc:v1.31.x
from
voidzcy:refactor/manage_global_client_stats_backport_1_31
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… interval measurement (grpc#7209) - Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to). - The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
In preparation for xds-v3 support.
…dsStream In preparation of xds-v3 support.
In preparation for xds-v3 support.
Duplicated `XdsClientImptTest` for V3. `XdsClientImptTestV2` and all other tests are still using V2. Even for `XdsClientImptTest`, although the protocol is V3, the test xds server still sends V2 resources in its V3 response.
Move the creation of LoadStatsStore (aka, the stats object) into XdsClient. The XdsClient is responsible for managing the lifetime of stats objects. Creations of LoadStatsStores are reference counted so that multiple EDS policies can retrieve the same stats object for load recording. Counters for recording loads per locality also need to be reference counted, as each EDS policy for the same cluster will receive endpoints for the same group of localities, they will use the same load counters for recording each locality's loads.
@@ -0,0 +1,3770 @@ | |||
/* | |||
* Copyright 2019 The gRPC Authors |
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.
should be 2020?
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.
We are not gonna change it here, this is cherry-picked for backporting. We could make a change on master.
dapengzhang0
approved these changes
Aug 11, 2020
Closing in favor of #7317 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move the creation of LoadStatsStore (aka, the stats object) into XdsClient. The XdsClient is responsible for managing the lifetime of stats objects. Creations of LoadStatsStores are reference counted so that multiple EDS policies can retrieve the same stats object for load recording. Counters for recording loads per locality also need to be reference counted, as each EDS policy for the same cluster will receive endpoints for the same group of localities, they will use the same load counters for recording each locality's loads.
This is backport of #7299
Including backports of dependent commits:
#7239
#7209
#7255
#7266
#7271
#7257
#7273
#7278
Manual change: there was an syncing issue between #7282 and #7299, in which the former changed
verifyZeroInteractions
toverifyNoInteractions
while the later didn't sync the build and thought it was broken and temporarily changed toverifyNoMoreInteractions
with TODO added. Manually resolved this conflict by following the latest commit.