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 leader verify in balance-region scheduler (#2966) #2994

Merged
merged 8 commits into from
Sep 21, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #2966 to release-4.0


Signed-off-by: Song Gao disxiaofei@163.com

What problem does this PR solve?

If the region have no leader during balance-region, it will pause PD panic and restart over and over.

What is changed and how it works?

Check region leader before balance region. If it has no leader, the balance for this region would be skipped.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix the bug that pd might panic If some regions have no leader when balance-region enabled.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added status/LGT1 Indicates that a PR has LGTM 1. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Sep 18, 2020
Signed-off-by: Song Gao <disxiaofei@163.com>
Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 21, 2020
@Yisaer
Copy link
Contributor

Yisaer commented Sep 21, 2020

/merge

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

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@Yisaer
Copy link
Contributor

Yisaer commented Sep 21, 2020

/run-all-tests

func (s *testBalanceRegionSchedulerSuite) TestShouldNotBalance(c *C) {
opt := config.NewTestOptions()
tc := mockcluster.NewCluster(opt)
tc.DisableFeature(versioninfo.JointConsensus)
Copy link
Member

Choose a reason for hiding this comment

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

not supported in release-4.0

Copy link
Contributor

@Yisaer Yisaer Sep 21, 2020

Choose a reason for hiding this comment

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

nice catch

Signed-off-by: Song Gao <disxiaofei@163.com>
@disksing
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2967
  • 2980
  • 2985
  • 2991

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Sep 21, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2980
  • 2977

@lhy1024
Copy link
Contributor

lhy1024 commented Sep 21, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2991
  • 2985
  • 2977

@lhy1024
Copy link
Contributor

lhy1024 commented Sep 21, 2020

/run-all-tests

1 similar comment
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Sep 21, 2020

/run-all-tests

1 similar comment
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Sep 21, 2020

/run-integration-ddl-test

@lhy1024
Copy link
Contributor

lhy1024 commented Sep 21, 2020

/run-integration-lightning-test

@HunDunDM
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@HunDunDM
Copy link
Member

/run-integration-lightning-test

@HunDunDM
Copy link
Member

/rebuild

@lhy1024 lhy1024 merged commit ab8a1bd into tikv:release-4.0 Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants