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: region should splitted if region is too hot. #6618

Merged
merged 23 commits into from Jul 11, 2023

Conversation

bufferflies
Copy link
Contributor

@bufferflies bufferflies commented Jun 16, 2023

What problem does this PR solve?

Issue Number: Close #6619

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
image image image

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

None.

Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 16, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

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 bot requested review from disksing and Yisaer June 16, 2023 01:35
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Jun 16, 2023
@bufferflies bufferflies requested review from lhy1024 and rleungx and removed request for disksing and Yisaer June 16, 2023 01:40
// regionIsTooHot returns true if any dim of the hot region is greater than the store threshold.
func regionIsTooHot(store *statistics.StoreLoadDetail, region *statistics.HotPeerStat) bool {
return slice.AnyOf(store.LoadPred.Current.Loads, func(i int) bool {
return region.Loads[i] > store.LoadPred.Current.Loads[i]*0.3
Copy link
Contributor

Choose a reason for hiding this comment

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

add const regionTooHotThreshold = 0.3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion, fixed

Signed-off-by: bufferflies <1045931706@qq.com>
@HuSharp
Copy link
Member

HuSharp commented Jun 16, 2023

Can u paste a picture to show region_is_too_hot?

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. Do we need some manual test?

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.

ci failed

Signed-off-by: bufferflies <1045931706@qq.com>
@bufferflies bufferflies changed the title schedulers: region should splited if region is too hot. schedulers: region should splitted if region is too hot. Jun 26, 2023
@bufferflies
Copy link
Contributor Author

LGTM. Do we need some manual test?

yes, I have upload the manual test result.

Signed-off-by: bufferflies <1045931706@qq.com>
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #6618 (6d8cdc7) into master (e18b9be) will increase coverage by 0.01%.
The diff coverage is 83.92%.

❗ Current head 6d8cdc7 differs from pull request most recent head 3bd39cb. Consider uploading reports for the commit 3bd39cb to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6618      +/-   ##
==========================================
+ Coverage   74.17%   74.18%   +0.01%     
==========================================
  Files         413      411       -2     
  Lines       43349    43067     -282     
==========================================
- Hits        32155    31951     -204     
+ Misses       8312     8247      -65     
+ Partials     2882     2869      -13     
Flag Coverage Δ
unittests 74.18% <83.92%> (+0.01%) ⬆️

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

@tonyxuqqi
Copy link

/release

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 3, 2023
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.

If workload is append write, split is not helpful

Copy link
Contributor

@nolouch nolouch 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-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 5, 2023
@bufferflies
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 5, 2023
Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
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, but ci failed

Signed-off-by: bufferflies <1045931706@qq.com>
Signed-off-by: bufferflies <1045931706@qq.com>
@bufferflies bufferflies removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2023
Signed-off-by: bufferflies <1045931706@qq.com>
@bufferflies
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 11, 2023

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

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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
Contributor

ti-chi-bot bot commented Jul 11, 2023

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

Commit hash: 1305bd3

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 11, 2023
@ti-chi-bot ti-chi-bot bot merged commit 1d0bbb8 into tikv:master Jul 11, 2023
22 checks passed
rleungx pushed a commit to rleungx/pd that referenced this pull request Dec 1, 2023
close tikv#6619

Signed-off-by: bufferflies <1045931706@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

region should be splitted if the region is too hot
6 participants