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

schedule: one operator only occupy one limit (#3820) #3857

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #3820

Signed-off-by: tongjian 1045931706@qq.com

What problem does this PR solve?

fix: #3807
#3778

What is changed and how it works?

operator controller's count will occupy the highest priority OpKind even if the operator has many OpKind.

the relation between limit and scheduler is blow:
image

red mark need to be changed

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

Release note

Reduce the conflict due to multiple scheduler running in same time

* use O(1) to get WMA

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

* add sonar file ignore code duplicated
Signed-off-by: tongjian <1045931706@qq.com>

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

* one operator should occupy one limit

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

* remove no need change

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

* move scheduler OpKind to operator.go

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

* replace opkind to get op producer by using LowBit

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

* pass uint test

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

* replace chinese link

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

* OperatorCount use O(1)

Signed-off-by: bufferflies <1045931706@qq.com>
@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved type/cherry-pick-for-release-5.1 The PR belongs to release-5.1 cherry pick. labels Jul 9, 2021
@ti-chi-bot ti-chi-bot requested review from rleungx, Yisaer and nolouch July 9, 2021 07:49
@codecov
Copy link

codecov bot commented Jul 9, 2021

Codecov Report

Merging #3857 (c8eb992) into release-5.1 (03b2a19) will decrease coverage by 0.16%.
The diff coverage is 22.22%.

❗ Current head c8eb992 differs from pull request most recent head 21f5f26. Consider uploading reports for the commit 21f5f26 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           release-5.1    #3857      +/-   ##
===============================================
- Coverage        75.18%   75.02%   -0.17%     
===============================================
  Files              245      245              
  Lines            24531    24538       +7     
===============================================
- Hits             18444    18409      -35     
- Misses            4474     4503      +29     
- Partials          1613     1626      +13     
Flag Coverage Δ
unittests 75.02% <22.22%> (-0.17%) ⬇️

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

Impacted Files Coverage Δ
server/schedule/operator/kind.go 100.00% <ø> (ø)
tools/pd-ctl/pdctl/ctl.go 39.63% <0.00%> (-3.50%) ⬇️
server/schedule/operator/operator.go 96.55% <100.00%> (+0.02%) ⬆️
server/schedule/operator_controller.go 85.10% <100.00%> (-0.10%) ⬇️
server/schedulers/balance_region.go 87.96% <100.00%> (ø)
pkg/tempurl/tempurl.go 60.00% <0.00%> (-10.00%) ⬇️
server/member/member.go 65.59% <0.00%> (-5.92%) ⬇️
pkg/dashboard/adapter/manager.go 78.72% <0.00%> (-4.26%) ⬇️
server/statistics/hot_cache_task.go 75.00% <0.00%> (-4.17%) ⬇️
pkg/etcdutil/etcdutil.go 84.70% <0.00%> (-3.53%) ⬇️
... and 19 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 f719036...21f5f26. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 13, 2021
@HunDunDM HunDunDM added this to the v5.1.1 milestone Jul 18, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Jul 19, 2021
Signed-off-by: nolouch <nolouch@gmail.com>
@bufferflies
Copy link
Contributor

lgtm

@ti-chi-bot
Copy link
Member Author

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HunDunDM
  • 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 added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 22, 2021
@HunDunDM
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member Author

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

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

Commit hash: d62537c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 22, 2021
@ti-chi-bot
Copy link
Member Author

@ti-chi-bot: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

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.

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 ti-chi-bot merged commit b5077f0 into tikv:release-5.1 Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5.1.1 cherry-pick-approved Cherry pick PR approved by release team. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick-for-release-5.1 The PR belongs to release-5.1 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants