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

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jun 17, 2020

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>
@rleungx rleungx added component/schedule Scheduling logic. needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. labels Jun 17, 2020
@rleungx rleungx added this to the v4.0.2 milestone Jun 17, 2020
@rleungx rleungx requested review from nolouch and lhy1024 June 17, 2020 08:40
@rleungx rleungx removed this from the v4.0.2 milestone Jun 17, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #2544 into master will increase coverage by 0.08%.
The diff coverage is 40.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2544      +/-   ##
==========================================
+ Coverage   77.11%   77.19%   +0.08%     
==========================================
  Files         204      204              
  Lines       22067    22071       +4     
==========================================
+ Hits        17016    17037      +21     
+ Misses       3771     3753      -18     
- Partials     1280     1281       +1     
Impacted Files Coverage Δ
pkg/mock/mockoption/mockoption.go 93.81% <33.33%> (-1.94%) ⬇️
server/schedule/operator_controller.go 79.87% <50.00%> (+1.33%) ⬆️
server/schedulers/base_scheduler.go 60.86% <0.00%> (-8.70%) ⬇️
pkg/metricutil/metricutil.go 86.11% <0.00%> (-5.56%) ⬇️
server/tso/tso.go 80.29% <0.00%> (-3.65%) ⬇️
server/grpc_service.go 58.99% <0.00%> (-1.17%) ⬇️
server/schedulers/adjacent_region.go 75.53% <0.00%> (-1.07%) ⬇️
server/core/storage.go 74.38% <0.00%> (-0.83%) ⬇️
server/server.go 76.48% <0.00%> (-0.46%) ⬇️
server/cluster/cluster.go 79.93% <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 33bf660...018cc35. Read the comment docs.

@disksing
Copy link
Contributor

/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

/run-all-tests

@ti-srebot ti-srebot merged commit db86815 into tikv:master Jun 17, 2020
@ti-srebot
Copy link
Contributor

cherry pick to release-3.1 failed

@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #2547

ti-srebot added a commit that referenced this pull request Jun 17, 2020
)

Signed-off-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/schedule Scheduling logic. needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. 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.

pd panic
5 participants