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

scheduler: add more nil-check code in adjacent_region #1403

Merged
merged 3 commits into from
Jan 14, 2019

Conversation

nanne007
Copy link
Contributor

@nanne007 nanne007 commented Jan 2, 2019

What problem does this PR solve?

Fix potential nil panic in adjust-region scheduler after pd leader changed. related pr is #1250

What is changed and how it works?

Just two nil check.

@sre-bot
Copy link
Contributor

sre-bot commented Jan 2, 2019

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@siddontang
Copy link
Contributor

Thanks @lerencao

can you add a test to simulate nil store here?

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@4bb9b96). Click here to learn what that means.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1403   +/-   ##
=========================================
  Coverage          ?   75.61%           
=========================================
  Files             ?      135           
  Lines             ?    13143           
  Branches          ?        0           
=========================================
  Hits              ?     9938           
  Misses            ?     2306           
  Partials          ?      899
Impacted Files Coverage Δ
server/schedulers/adjacent_region.go 74.56% <50%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bb9b96...a7bc34d. Read the comment docs.

@nolouch nolouch merged commit 872d8da into tikv:master Jan 14, 2019
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants