-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
runaway: Add processed_keys and request_ru to check #55147
runaway: Add processed_keys and request_ru to check #55147
Conversation
Skipping CI for Draft Pull Request. |
Hi @HuSharp. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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-sigs/prow repository. |
cf6ddd7
to
f4fdef6
Compare
f4fdef6
to
db7e3f5
Compare
PR needs rebase. 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. |
3ee3027
to
9fa3c96
Compare
/test all |
@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #55147 +/- ##
================================================
+ Coverage 73.4116% 75.8774% +2.4658%
================================================
Files 1601 1653 +52
Lines 444010 454562 +10552
================================================
+ Hits 325955 344910 +18955
+ Misses 98086 88121 -9965
- Partials 19969 21531 +1562
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9fa3c96
to
4667c22
Compare
/test all |
@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
4667c22
to
dca78c7
Compare
/retest |
Signed-off-by: husharp <[email protected]>
8316701
to
e668657
Compare
/retest |
/test all |
/retest-required |
Signed-off-by: husharp <[email protected]>
/retest-required |
@@ -222,6 +222,8 @@ func SetDirectResourceGroupSettings(groupInfo *model.ResourceGroupInfo, opt *ast | |||
case ast.ResourceGroupRunaway: | |||
if len(opt.RunawayOptionList) == 0 { | |||
resourceGroupSettings.Runaway = nil | |||
} else { | |||
resourceGroupSettings.Runaway = &model.ResourceGroupRunawaySettings{} |
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.
This part changed the behavior, for the old code, if resourceGroupSettings.Runaway
is not nil, it won't be overwritten in SetDirectResourceGroupRunawayOption
, but now it will be reset to an empty new one if len(opt.RunawayOptionList) > 0
. Will this be a problem?
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.
Nice catch, fixed. Yes, the new behavior has been discussed with PM.
@@ -915,6 +918,10 @@ func (sender *copIteratorTaskSender) run(connID uint64) { | |||
if sender.respChan != nil { | |||
close(sender.respChan) | |||
} | |||
if checker != nil { |
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.
No need to check since ResetTotalProcessedKeys
will do it also.
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.
struct's checker field is of type RunawayChecker
, which is an interface, but it hasn't been initialized with a instance. When calling checker.ResetTotalProcessedKeys(),
the value of checker
is nil, leading to a runtime error: invalid memory address or nil pointer dereference.
You can check this playground
Instead of the following approach, maybe we can judge in ResetTotalProcessedKeys
?
if checker != nil {
if rcChecker, ok := checker.(*Checker); ok && rcChecker != nil {
rcChecker.ResetTotalProcessedKeys()
}
@tangenta PTAL |
Signed-off-by: husharp <[email protected]>
/retest-required |
Signed-off-by: husharp <[email protected]>
/retest |
Signed-off-by: husharp <[email protected]>
Signed-off-by: husharp <[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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: glorv, nolouch, tangenta, yudongusa 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 |
/retest-required |
What problem does this PR solve?
Issue Number: ref #54434, merged after pingcap/kvproto#1261 (review)
Problem Summary:
What changed and how does it work?
supports PROCESSED_KEYS and REQUEST_UNIT to check runaway
Explain
Can check doc https://github.com/pingcap/docs/pull/18858/files
Processed_keys: The number of keys that Coprocessor has processed. Compared with total_keys, processed_keys does not include the old versions of MVCC. A great difference between processed_keys and total_keys indicates that many old versions exist.
REQUEST_UNIT: The number of request units produced by the query. It's the total number of Request_unit_read and Request_unit_write.
Display
can check in log
check query result
Check List
Tests
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.