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: refactor calcProgressiveRank in hot-scheduler #4950

Merged
merged 5 commits into from
May 16, 2022

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented May 13, 2022

Signed-off-by: lhy1024 [email protected]

What problem does this PR solve?

Issue Number: Ref #4949

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

lhy1024 added 2 commits May 13, 2022 17:50
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
@lhy1024 lhy1024 requested review from nolouch, HunDunDM and rleungx May 13, 2022 10:01
@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 13, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HunDunDM
  • bufferflies

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 May 13, 2022
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #4950 (e1cb31a) into master (eed19e0) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head e1cb31a differs from pull request most recent head 22a314b. Consider uploading reports for the commit 22a314b to get more accurate results

@@            Coverage Diff             @@
##           master    #4950      +/-   ##
==========================================
- Coverage   75.33%   75.31%   -0.03%     
==========================================
  Files         297      297              
  Lines       29497    29462      -35     
==========================================
- Hits        22223    22189      -34     
  Misses       5332     5332              
+ Partials     1942     1941       -1     
Flag Coverage Δ
unittests 75.31% <100.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
server/schedulers/hot_region_config.go 92.13% <ø> (ø)
server/schedulers/hot_region.go 83.38% <100.00%> (+0.30%) ⬆️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
server/cluster/prepare_checker.go 90.00% <0.00%> (-10.00%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-6.76%) ⬇️
pkg/progress/progress.go 94.73% <0.00%> (-5.27%) ⬇️
server/schedule/labeler/rules.go 87.20% <0.00%> (-2.57%) ⬇️
pkg/etcdutil/etcdutil.go 82.75% <0.00%> (-2.30%) ⬇️
server/storage/endpoint/meta.go 61.79% <0.00%> (-2.25%) ⬇️
server/storage/hot_region_storage.go 79.23% <0.00%> (-2.19%) ⬇️
... and 20 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 f1d026e...22a314b. Read the comment docs.

Signed-off-by: lhy1024 <[email protected]>
Copy link
Member

@HunDunDM HunDunDM 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

server/schedulers/hot_region.go Outdated Show resolved Hide resolved
server/schedulers/hot_region.go Show resolved Hide resolved
server/schedulers/hot_region.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 13, 2022
Signed-off-by: lhy1024 <[email protected]>
// If belong to the case, two dim will be more balanced, the best choice.
if !bs.isTolerance(src, dst, bs.firstPriority) || !bs.isTolerance(src, dst, bs.secondPriority) {
return
}
bs.cur.progressiveRank = -3
Copy link
Contributor

Choose a reason for hiding this comment

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

how about use enum to replace progressiveRank like -3, -2 , -1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we will add more case in another pr

Copy link
Contributor

@bufferflies bufferflies 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

@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 May 16, 2022
@lhy1024
Copy link
Contributor Author

lhy1024 commented May 16, 2022

/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: e1cb31a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 16, 2022
@ti-chi-bot ti-chi-bot merged commit 9dad950 into tikv:master May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants