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: consider evict leader when calc expect #3967

Merged
merged 8 commits into from
Aug 12, 2021

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Aug 12, 2021

Signed-off-by: lhy1024 admin@liudos.us

What problem does this PR solve?

fix #3959

What is changed and how it works?

  1. consider evict leader when calc expect
  2. reduce the pending amp factor
  3. unify qps and query as query, to ensure consistency with the documentation pd-control: add new config of balance-hot-region-scheduler pingcap/docs-cn#6835

Check List

Tests

  • Unit test

Related changes

Release note

None.

@lhy1024 lhy1024 added component/scheduler Scheduler logic. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 labels Aug 12, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 12, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HunDunDM
  • Yisaer

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 12, 2021
Signed-off-by: lhy1024 <admin@liudos.us>
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.

Rest LGTM

Signed-off-by: lhy1024 <admin@liudos.us>
@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #3967 (fb3c550) into master (bf39734) will decrease coverage by 0.01%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3967      +/-   ##
==========================================
- Coverage   74.56%   74.55%   -0.02%     
==========================================
  Files         250      250              
  Lines       25486    25505      +19     
==========================================
+ Hits        19003    19014      +11     
- Misses       4793     4794       +1     
- Partials     1690     1697       +7     
Flag Coverage Δ
unittests 74.55% <81.81%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/schedulers/hot_region.go 83.87% <ø> (-0.28%) ⬇️
server/schedulers/hot_region_config.go 89.31% <ø> (ø)
pkg/mock/mockcluster/mockcluster.go 95.25% <60.00%> (-0.45%) ⬇️
server/schedulers/utils.go 94.37% <88.23%> (-0.69%) ⬇️
pkg/etcdutil/etcdutil.go 84.70% <0.00%> (-3.53%) ⬇️
server/tso/tso.go 59.11% <0.00%> (-1.66%) ⬇️
server/member/member.go 63.10% <0.00%> (-1.61%) ⬇️
server/schedule/operator/step.go 68.43% <0.00%> (-1.33%) ⬇️
server/schedule/operator_controller.go 84.75% <0.00%> (-0.80%) ⬇️
server/tso/allocator_manager.go 66.44% <0.00%> (-0.67%) ⬇️
... and 10 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 bf39734...fb3c550. Read the comment docs.

server/schedulers/hot_region_test.go Outdated Show resolved Hide resolved
server/schedulers/utils.go Outdated Show resolved Hide resolved
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 12, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 12, 2021
@lhy1024
Copy link
Contributor Author

lhy1024 commented Aug 12, 2021

/merge

@ti-chi-bot
Copy link
Member

@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 21e9001

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 12, 2021
@ti-chi-bot ti-chi-bot merged commit 11c55c2 into tikv:master Aug 12, 2021
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Aug 12, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3974.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Aug 12, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3975.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Aug 12, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3976.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3977.

ti-chi-bot added a commit that referenced this pull request Aug 13, 2021
* update

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
ti-chi-bot added a commit that referenced this pull request Aug 27, 2021
* address comments

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
ti-chi-bot added a commit that referenced this pull request Sep 7, 2021
Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
ti-chi-bot added a commit that referenced this pull request Sep 14, 2021
Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/scheduler Scheduler logic. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hot-region-scheduler not work when there is evict-leader-scheduler in cluster
4 participants