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
resource_manager/client: resource group Independent reporting time #6150
resource_manager/client: resource group Independent reporting time #6150
Conversation
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Skipping CI for Draft Pull Request. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6150 +/- ##
==========================================
- Coverage 74.41% 74.37% -0.05%
==========================================
Files 391 391
Lines 38175 38161 -14
==========================================
- Hits 28409 28382 -27
- Misses 7241 7265 +24
+ Partials 2525 2514 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 28 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
rest lgtm
c.run.requestNeedsRetry = false | ||
c.collectTokenBucketRequests(c.loopCtx, FromPeriodReport, false /* select all */) | ||
if len(c.run.currentRequests) == 0 { | ||
c.collectTokenBucketRequests(c.loopCtx, FromPeriodReport, 0 /* select resource groups which should be reported periodically */) |
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.
c.collectTokenBucketRequests(c.loopCtx, FromPeriodReport, 0 /* select resource groups which should be reported periodically */) | |
c.collectTokenBucketRequests(c.loopCtx, FromPeriodReport, periodicReport /* select resource groups which should be reported periodically */) |
if !c.run.requestInProgress { | ||
c.collectTokenBucketRequests(c.loopCtx, FromLowRU, true /* only select low tokens resource group */) | ||
if len(c.run.currentRequests) == 0 { | ||
c.collectTokenBucketRequests(c.loopCtx, FromLowRU, 1 /* select low tokens resource group */) |
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.
c.collectTokenBucketRequests(c.loopCtx, FromLowRU, 1 /* select low tokens resource group */) | |
c.collectTokenBucketRequests(c.loopCtx, FromLowRU, lowToken /* select low tokens resource group */) |
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
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.
The rest LGTM.
@@ -88,20 +95,7 @@ type ResourceGroupsController struct { | |||
tokenBucketUpdateChan chan *groupCostController | |||
|
|||
run struct { |
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.
May I suggest removing the redundant field as it appears to only contain a single value?
// requestFailed is set true when sending token bucket request. | ||
// And it is set false when reciving token bucket response. | ||
// This triggers a retry attempt on the next tick. | ||
requestFailed bool |
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.
The usage looks not very related to the "fail", requestInProgress
makes more sence to me.
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
/merge |
@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 691c2aa
|
@CabinfeverB: Your PR was out of date, I have automatically updated it for you. If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: Close #6151 Close #6113
What is changed and how does it work?
The following changes have been made:
ResourceGroupsController
and introducerequestFailed
andlastRequestTime
intogroupCostController
.stateUpdateTicker
check is triggered, all resource groups are traversed to see if they need to be reported. There are three conditions for the report: low token, RU consumption in the period exceeds the threshold, and the last request fails.Check List
Tests
Release note