-
Notifications
You must be signed in to change notification settings - Fork 726
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
checker: fix the issue that unhealthy region cause panic #5494
Conversation
[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. |
9a0a374
to
2a0b1f1
Compare
Signed-off-by: nolouch <[email protected]>
2a0b1f1
to
e369b1d
Compare
Codecov ReportBase: 75.55% // Head: 75.50% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5494 +/- ##
==========================================
- Coverage 75.55% 75.50% -0.06%
==========================================
Files 320 320
Lines 31642 31650 +8
==========================================
- Hits 23907 23897 -10
- Misses 5670 5690 +20
+ Partials 2065 2063 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -236,10 +236,14 @@ func (c *RuleChecker) fixLooseMatchPeer(region *core.RegionInfo, fit *placement. | |||
checkerCounter.WithLabelValues("rule_checker", "fix-peer-role").Inc() | |||
return operator.CreatePromoteLearnerOperator("fix-peer-role", c.cluster, region, peer) | |||
} | |||
if region.GetLeader() == nil { | |||
checkerCounter.WithLabelValues("rule_checker", "region-no-leader").Inc() | |||
return nil, 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.
Maybe we can return an error, so L158 can 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.
agree
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.
If the region doesn't have a leader, is it necessary to check it?
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.
@rleungx I think no need, address it.
Signed-off-by: nolouch <[email protected]>
ptal @HunDunDM @CabinfeverB |
61da359
to
88246a3
Compare
Signed-off-by: nolouch <[email protected]>
88246a3
to
b7297ef
Compare
/merge |
@rleungx: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests 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: b7297ef
|
In response to a cherrypick label: new pull request created: #5495. |
close tikv#5491 Signed-off-by: ti-chi-bot <[email protected]>
close #5491, ref #5494 checker: fix the issue that unhealthy region cause panic Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: nolouch <[email protected]> Co-authored-by: ShuNing <[email protected]> Co-authored-by: nolouch <[email protected]>
Signed-off-by: nolouch [email protected]
What problem does this PR solve?
Issue Number: Close #5491
What is changed and how does it work?
Check List
Tests
Release note