-
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
client/controller: record context error and add slowlog about token bucket #8344
Conversation
4e5bdb3
to
725ece1
Compare
5109730
to
9482860
Compare
…ucket request Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
9482860
to
90cf6c3
Compare
@@ -218,7 +224,8 @@ func (lim *Limiter) Reserve(ctx context.Context, waitDuration time.Duration, now | |||
select { | |||
case <-ctx.Done(): | |||
return &Reservation{ | |||
ok: false, | |||
ok: false, | |||
err: ctx.Err(), |
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.
Can we use err
instead of ok
? That would add ErrClientResourceGroupThrottled
to err.
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.
ok
is only used for can if reserved enough tokens, but the error may include others like ctx.Error()
.
let's keep min changes in this PR first, I don't want to bring potential risks to other branches by picking.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HuSharp, JmPotato The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@nolouch: The following test failed, say
Full PR test history. Your PR dashboard. 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 kubernetes/test-infra repository. I understand the commands that are listed here. |
/run-cherry-picker |
close tikv#8343 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
close tikv#8343 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
close tikv#8343 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
…ucket (#8344) (#8355) close #8343, ref #8349 client/controller: record context error and add slowlog about token bucket - record low process start time, and log it if it's too slow - record the context error Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> Co-authored-by: ShuNing <nolouch@gmail.com> Co-authored-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
…ucket (#8344) (#8356) close #8343, ref #8349 client/controller: record context error and add slowlog about token bucket - record low process start time, and log it if it's too slow - record the context error Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> Co-authored-by: ShuNing <nolouch@gmail.com> Co-authored-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
/run-cherry-picker |
In response to a cherrypick label: new pull request created to branch |
…ucket (#8344) (#8354) close #8343, ref #8349 client/controller: record context error and add slowlog about token bucket - record low process start time, and log it if it's too slow - record the context error Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> Co-authored-by: ShuNing <nolouch@gmail.com> Co-authored-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
…ucket (tikv#8344) (tikv#8355) close tikv#8343, ref tikv#8349 client/controller: record context error and add slowlog about token bucket - record low process start time, and log it if it's too slow - record the context error Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> Co-authored-by: ShuNing <nolouch@gmail.com> Co-authored-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local>
…he local bucket (#8352) (#8365) * client/controller: record context error and add slowlog about token bucket (#8344) (#8355) close #8343, ref #8349 client/controller: record context error and add slowlog about token bucket - record low process start time, and log it if it's too slow - record the context error Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> * This is an automated cherry-pick of #8352 close #8349 Signed-off-by: nolouch <nolouch@gmail.com> Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> --------- Signed-off-by: Shuning Chen <nolouch@ShuningdeMacBook-Pro.local> Signed-off-by: nolouch <nolouch@gmail.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: Close #8343
What is changed and how does it work?
Check List
Tests
Release note