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

schedulers: balance region consider pending peer #1617

Merged
merged 4 commits into from
Jul 9, 2019

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Jul 3, 2019

Signed-off-by: nolouch nolouch@gmail.com

What problem does this PR solve?

balance region not select a source store with many pending peers is unreasonable:

  • pending peers means the log may not catch up with the leader, the most case is the disk busy than another store. move the peer to idle another store more reasonable.
  • If not select the store as a source store, the pending peers may be more and more.

What is changed and how it works?

  • Do not filter the source store
  • Priority to select a pending peer to balance.

Check List

Tests

  • Unit test
  • Integration test

@nolouch nolouch added the needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch. label Jul 3, 2019
Signed-off-by: nolouch <nolouch@gmail.com>
Copy link
Contributor

@shafreeck shafreeck left a comment

Choose a reason for hiding this comment

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

LGTM

server/schedule/filters.go Outdated Show resolved Hide resolved
server/schedulers/balance_test.go Outdated Show resolved Hide resolved
Signed-off-by: nolouch <nolouch@gmail.com>
server/schedule/filters.go Outdated Show resolved Hide resolved
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch nolouch merged commit 2053c20 into tikv:master Jul 9, 2019
@nolouch nolouch deleted the adjust-pending branch July 9, 2019 02:44
rleungx pushed a commit to rleungx/pd that referenced this pull request Jul 10, 2019
* schedulers: balance region consider pending peers

Signed-off-by: nolouch <nolouch@gmail.com>
@rleungx rleungx mentioned this pull request Jul 10, 2019
4 tasks
nolouch pushed a commit that referenced this pull request Jul 11, 2019
* schedulers: balance region consider pending peer (#1617)

* schedulers: balance region consider pending peers

Signed-off-by: nolouch <nolouch@gmail.com>

* scheduler: check replica for hot region  (#1609)

* check replica for hot region scheduler

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

* schedule: set influence according to region size (#1613)

* not consider store limit when executing merge

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

* set influence according to region size

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

* fix race problems

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

* config: turn the default limit of the hot region schedule (#1616)

* config: turn the default limit of the hot region schedule

Signed-off-by: nolouch <nolouch@gmail.com>

* update CHANGELOG

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
needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants