-
Notifications
You must be signed in to change notification settings - Fork 720
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: ignore ru metrics for background request #6766
Conversation
[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. |
9ee0467
to
b3a746e
Compare
b3a746e
to
1015d67
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #6766 +/- ##
==========================================
- Coverage 74.32% 74.22% -0.11%
==========================================
Files 414 414
Lines 43447 43469 +22
==========================================
- Hits 32294 32264 -30
- Misses 8297 8337 +40
- Partials 2856 2868 +12
Flags with carried forward coverage won't be shown. Click here to find out more. |
6b3ae84
to
5a34eab
Compare
@@ -104,6 +104,22 @@ var ( | |||
Name: "available_ru", | |||
Help: "Counter of the available RU for all resource groups.", | |||
}, []string{resourceGroupNameLabel}) | |||
|
|||
// Background RU cost metrics. | |||
backgroundReadRequestUnitCost = prometheus.NewCounterVec( |
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.
maybe add a type as we disscussed?
d540c43
to
5ab1349
Compare
return false | ||
} | ||
|
||
gc.metaLock.Lock() |
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.
Is Rwlock better here as this call can in the hot path
if len(requestResource) == 0 || len(bg.JobTypes) == 0 { | ||
return false | ||
} | ||
if idx := strings.LastIndex(requestResource, "_"); idx != -1 { |
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 also implement the fallback to default logic here
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.
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.
Yes. That means if a non-default resource group's config is not explicitly set, you should uses the default group's rule to check it.
Signed-off-by: husharp <jinhao.hu@pingcap.com>
5ab1349
to
78966d8
Compare
a88a8b6
to
dfe5ede
Compare
Signed-off-by: husharp <jinhao.hu@pingcap.com>
dfe5ede
to
6698aa7
Compare
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Signed-off-by: husharp <jinhao.hu@pingcap.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.
lgtm, plz update the proto.
Signed-off-by: husharp <jinhao.hu@pingcap.com>
@glorv @CabinfeverB friendly ping~ |
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.
LGTM
/merge |
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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: 9e01e14
|
@HuSharp: 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: Ref #5851
What is changed and how does it work?
Check List
Tests
Release note