-
Notifications
You must be signed in to change notification settings - Fork 721
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
mcs/resourcemanager: delete expire tokenSlot #7344
Conversation
Signed-off-by: guo-shaoge <[email protected]>
[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. |
Signed-off-by: guo-shaoge <[email protected]>
…o del_expire_slot
Codecov Report
@@ Coverage Diff @@
## master #7344 +/- ##
==========================================
+ Coverage 74.36% 74.44% +0.07%
==========================================
Files 446 446
Lines 48441 48451 +10
==========================================
+ Hits 36025 36071 +46
+ Misses 9234 9190 -44
- Partials 3182 3190 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
@@ -139,6 +147,13 @@ func (gts *GroupTokenBucketState) balanceSlotTokens( | |||
} | |||
} | |||
|
|||
for clientUniqueID, slot := range gts.tokenSlots { |
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 check this every handling request?
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 refine so we can check every 10mins
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.
Add gts.lastCheckExpireSlot
as a guard
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
now := time.Now() | ||
gts.lastCheckExpireSlot = now |
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 check expiration here first?
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.
deleted, no need to update here
Signed-off-by: guo-shaoge <[email protected]>
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!
seems like DCO is wrong with
|
Signed-off-by: guo-shaoge <[email protected]>
7201cce
to
c179d78
Compare
fixed |
No test in this PR, can u do a manual test? @guo-shaoge |
tested last night.
|
/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: 473b423
|
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 #7346 Signed-off-by: guo-shaoge <[email protected]> Co-authored-by: guo-shaoge <[email protected]>
close #7346 Signed-off-by: guo-shaoge <[email protected]> Co-authored-by: guo-shaoge <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
What problem does this PR solve?
If tidb/tiflash crash unexpectly or killed by signal which cannot be handled, there will be a useless slot, which will cause fillrate/burstlimit become less than expected for other alive ones.
So add a expire timeout(10min).
Issue Number: Close #7346
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