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

schedule: fix panic when setting store-limit-mode to auto (#2544) #2547

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #2544 to release-4.0


What problem does this PR solve?

Closes #2540.

What is changed and how it works?

This PR checks if the store limits of adding peer and removing peer are existed before calling Mode.

Check List

Tests

  • Unit test

Release note

  • Fix the issue that It may panic when setting store-limit-mode to auto

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #2547 into release-4.0 will decrease coverage by 0.01%.
The diff coverage is 40.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #2547      +/-   ##
===============================================
- Coverage        77.16%   77.15%   -0.02%     
===============================================
  Files              204      204              
  Lines            21940    21944       +4     
===============================================
  Hits             16931    16931              
- Misses            3724     3727       +3     
- Partials          1285     1286       +1     
Impacted Files Coverage Δ
pkg/mock/mockoption/mockoption.go 93.81% <33.33%> (-1.94%) ⬇️
server/schedule/operator_controller.go 82.21% <50.00%> (+1.37%) ⬆️
server/kv/etcd_kv.go 75.32% <0.00%> (-12.99%) ⬇️
server/schedulers/base_scheduler.go 60.86% <0.00%> (-8.70%) ⬇️
server/region_syncer/client.go 81.67% <0.00%> (-3.06%) ⬇️
server/cluster/coordinator.go 74.52% <0.00%> (-2.20%) ⬇️
server/schedulers/adjacent_region.go 75.53% <0.00%> (-1.07%) ⬇️
pkg/btree/btree.go 86.84% <0.00%> (-0.81%) ⬇️
server/handler.go 51.18% <0.00%> (-0.44%) ⬇️
server/cluster/cluster.go 80.58% <0.00%> (+0.43%) ⬆️
... and 8 more

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 85a49d5...b3e651f. Read the comment docs.

@lhy1024
Copy link
Contributor

lhy1024 commented Jun 17, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 17, 2020
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit 330768a into tikv:release-4.0 Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/schedule Scheduling logic. status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants