Skip to content
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

*: fix panic that region may not exist #6464

Merged
merged 3 commits into from May 15, 2023
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented May 15, 2023

What problem does this PR solve?

Issue Number: Close #6456.

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 15, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Patch coverage: 40.00% and project coverage change: +0.02 🎉

Comparison is base (e42ffbe) 74.82% compared to head (199c32a) 74.84%.

❗ Current head 199c32a differs from pull request most recent head 4b5159d. Consider uploading reports for the commit 4b5159d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6464      +/-   ##
==========================================
+ Coverage   74.82%   74.84%   +0.02%     
==========================================
  Files         410      410              
  Lines       41736    41740       +4     
==========================================
+ Hits        31227    31241      +14     
+ Misses       7798     7784      -14     
- Partials     2711     2715       +4     
Flag Coverage Δ
unittests 74.84% <40.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/cluster/coordinator.go 73.19% <40.00%> (-0.36%) ⬇️

... and 28 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rleungx rleungx requested review from bufferflies and removed request for disksing May 15, 2023 04:01
if labelMgr.ScheduleDisabled(s.cluster.GetRegion(op.RegionID())) {
region := s.cluster.GetRegion(op.RegionID())
if region == nil {
ops = append(ops[:i], ops[i+1:]...)
Copy link
Contributor

@nolouch nolouch May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime error: slice bounds out of range [2:1] [recovered]

It will outbounds after deleting an item if there len(ops) >= 2.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx requested a review from nolouch May 15, 2023 04:29
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 15, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 15, 2023
@nolouch
Copy link
Contributor

nolouch commented May 15, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 15, 2023

@nolouch: 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.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 15, 2023

This pull request has been accepted and is ready to merge.

Commit hash: 0bdc984

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label May 15, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 15, 2023

@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.

@ti-chi-bot ti-chi-bot bot merged commit 6d75888 into tikv:master May 15, 2023
19 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #6466.

@rleungx rleungx deleted the fix-panic4 branch May 15, 2023 07:14
ti-chi-bot bot pushed a commit that referenced this pull request May 15, 2023
close #6456, ref #6464

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
nolouch pushed a commit to ti-chi-bot/pd that referenced this pull request May 24, 2023
close tikv#6456

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.1 release-note-none status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pd panicked during jepsen tests
4 participants