-
Notifications
You must be signed in to change notification settings - Fork 728
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
schedule: fix panic when switching placement rules #7415
Conversation
Signed-off-by: Ryan Leung <[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. |
@@ -132,6 +132,11 @@ func (c *RuleChecker) CheckWithFit(region *core.RegionInfo, fit *placement.Regio | |||
return | |||
} | |||
|
|||
// the placement rule is disabled |
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 pick it to other branches?
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7415 +/- ##
==========================================
+ Coverage 74.21% 74.29% +0.08%
==========================================
Files 451 451
Lines 49385 49388 +3
==========================================
+ Hits 36652 36694 +42
+ Misses 9461 9432 -29
+ Partials 3272 3262 -10
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -132,6 +132,11 @@ func (c *RuleChecker) CheckWithFit(region *core.RegionInfo, fit *placement.Regio | |||
return | |||
} | |||
|
|||
// the placement rule is disabled | |||
if fit == nil { | |||
return |
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 add one metrics for it or add log?
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.
I think no need since it happens only once.
/merge |
@rleungx: 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: f0c97e9
|
@rleungx: 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. |
In response to a cherrypick label: new pull request created to branch |
close tikv#7414 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
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 #7414 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]> Co-authored-by: Hu# <[email protected]>
close tikv#7414 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
close #7414 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
close #7414 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
close #7414 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
What problem does this PR solve?
Issue Number: Close #7414.
What is changed and how does it work?
When we going to disable the placement rule, we might first check:
pd/pkg/schedule/checker/checker_controller.go
Line 89 in 8e6dcfb
Before we change it, the value is true. But when we call:
pd/pkg/schedule/checker/checker_controller.go
Line 102 in 8e6dcfb
pd/pkg/schedule/checker/priority_inspector.go
Lines 64 to 74 in 8e6dcfb
The value can be changed to false. So the fit will be nil in this case.
Check List
Tests
Release note