-
Notifications
You must be signed in to change notification settings - Fork 725
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
client: return total wait duration in resource interceptor OnRequestWait call #7488
Conversation
Signed-off-by: glorv <glorvs@163.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. |
@nolouch @CabinfeverB @HuSharp PTAL |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7488 +/- ##
==========================================
- Coverage 74.32% 74.24% -0.08%
==========================================
Files 452 452
Lines 49915 49918 +3
==========================================
- Hits 37098 37062 -36
- Misses 9490 9512 +22
- Partials 3327 3344 +17
Flags with carried forward coverage won't be shown. Click here to find out 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.
rest LGTM
@@ -57,7 +57,7 @@ const ( | |||
// ResourceGroupKVInterceptor is used as quota limit controller for resource group using kv store. | |||
type ResourceGroupKVInterceptor interface { | |||
// OnRequestWait is used to check whether resource group has enough tokens. It maybe needs to wait some time. | |||
OnRequestWait(ctx context.Context, resourceGroupName string, info RequestInfo) (*rmpb.Consumption, *rmpb.Consumption, uint32, error) | |||
OnRequestWait(ctx context.Context, resourceGroupName string, info RequestInfo) (*rmpb.Consumption, *rmpb.Consumption, time.Duration, uint32, error) |
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.
Do we need to wrap into a 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.
Not sure if there is a best practice. In general, multiple return parameters are organized as a tuple, so should be no performance issue.
@glorv merge it right now? |
/merge |
@CabinfeverB: 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: b19ebbf
|
/label cherry-pick-7.5 |
@glorv: The label(s) In response to this:
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. |
/cherry-picker release-7.5 |
/label needs-cherry-pick-release-7.5 |
In response to a cherrypick label: new pull request created to branch |
ref tikv#5851 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ref tikv#5851 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: ref #5851
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tiup
:Release note