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/hot: let leader can be schedule even if the peer is not balanced #2298

Merged
merged 4 commits into from
Mar 30, 2020

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Mar 28, 2020

…lanced

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

What problem does this PR solve?

In this scenario: 9 tikv, running with a workload oltp_insert (6 tables)

  • the count is not suitable for calculating limit because there are many hot regions (index) and only 6 very hot regions (row data)
  • there are too many hot regions, so the hot leader may have no chance to be scheduled.
    image
    image

What is changed and how it works?

  • remove the auto limit
  • randomly schedule peer or leader.

Release note

Check List

Tests

  • Unit test
  • Integration test
  • Manual test

…lanced

Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch nolouch added priority/P1 The issue has P1 priority. component/schedule Scheduling logic. labels Mar 28, 2020
@nolouch nolouch added this to the v4.0.0-rc milestone Mar 28, 2020
@nolouch nolouch requested review from lhy1024 and rleungx March 28, 2020 17:47
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch
Copy link
Contributor Author

nolouch commented Mar 28, 2020

/rebuild

@lhy1024
Copy link
Contributor

lhy1024 commented Mar 29, 2020

/run-all-tests

1 similar comment
@rleungx
Copy link
Member

rleungx commented Mar 30, 2020

/run-all-tests

Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: nolouch <nolouch@gmail.com>
@lhy1024
Copy link
Contributor

lhy1024 commented Mar 30, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 30, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

@nolouch merge failed.

@nolouch
Copy link
Contributor Author

nolouch commented Mar 30, 2020

/rebuild

@lhy1024
Copy link
Contributor

lhy1024 commented Mar 30, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

@nolouch merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Mar 30, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

@nolouch merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Mar 30, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

@nolouch merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Mar 30, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

@nolouch merge failed.

@nolouch nolouch merged commit faf0088 into tikv:master Mar 30, 2020
@nolouch nolouch deleted the random-sche branch March 30, 2020 16:59
nolouch added a commit to nolouch/pd that referenced this pull request Apr 10, 2020
…lanced (tikv#2298)

* schedulers/hot: let leader can be schedule even if the peer is not balanced

Signed-off-by: nolouch <nolouch@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. priority/P1 The issue has P1 priority. 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.

4 participants