Skip to content

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Aug 3, 2021

What problem does this PR solve?

Low versions of tikv do not have qps statistics, so when using a low version of tikv with a high version of pd, the hotspot scheduling will not be as expected

What is changed and how it works?

For upgrading from versions before 5.2 to 5.2, regardless of the read priorities and write priorities, pd will schedule hotspots according to byte and key priorities until all tikv's in the cluster have been upgraded.

Check List

Tests

  • Unit test

Release note

None

lhy1024 added 5 commits August 2, 2021 19:40
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>
@lhy1024 lhy1024 added the component/scheduler Scheduler logic. label Aug 3, 2021
@lhy1024 lhy1024 requested review from Yisaer and HunDunDM August 3, 2021 10:22
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 3, 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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 3, 2021
@lhy1024 lhy1024 added the priority/P1 The issue has P1 priority. label Aug 3, 2021
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 3, 2021
@HunDunDM
Copy link
Member

HunDunDM commented Aug 3, 2021

/rebuild

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.

During upgrading tikv, pd-ctl may still show qps as default strategy by scheduler config

@codecov
Copy link

codecov bot commented Aug 3, 2021

Codecov Report

Merging #3947 (b0b18f4) into master (22f23fe) will increase coverage by 0.05%.
The diff coverage is 91.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3947      +/-   ##
==========================================
+ Coverage   74.65%   74.71%   +0.05%     
==========================================
  Files         246      246              
  Lines       25094    25117      +23     
==========================================
+ Hits        18734    18765      +31     
+ Misses       4701     4699       -2     
+ Partials     1659     1653       -6     
Flag Coverage Δ
unittests 74.71% <91.48%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
server/versioninfo/feature.go 60.00% <ø> (ø)
server/schedulers/hot_region.go 86.62% <87.50%> (+0.20%) ⬆️
server/replication/replication_mode.go 78.11% <100.00%> (+2.57%) ⬆️
server/schedulers/hot_region_config.go 85.95% <100.00%> (+1.54%) ⬆️
server/kv/etcd_kv.go 72.46% <0.00%> (-7.25%) ⬇️
server/region_syncer/server.go 83.08% <0.00%> (-5.89%) ⬇️
pkg/dashboard/adapter/manager.go 79.78% <0.00%> (-3.20%) ⬇️
pkg/btree/btree.go 85.30% <0.00%> (-0.97%) ⬇️
server/config/persist_options.go 91.50% <0.00%> (-0.78%) ⬇️
server/cluster/coordinator.go 73.42% <0.00%> (-0.70%) ⬇️
... and 8 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 730853b...b0b18f4. Read the comment docs.

@HunDunDM
Copy link
Member

HunDunDM commented Aug 3, 2021

Is it enough to explain in the documentation?

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 4, 2021
Signed-off-by: lhy1024 <admin@liudos.us>
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

Signed-off-by: lhy1024 <admin@liudos.us>
@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 4, 2021
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
}

bs.isSelectedDim = func(dim int) bool {
return dim == bs.firstPriority || dim == bs.secondPriority
}
}

// adjustConfig will adjust config for cluster with low version tikv
// because tikv below 5.2.0 does not report query information, we will use byte and key as the scheduling dimensions
func (bs *balanceSolver) adjustConfig(origins, defaults []string) (first, second int) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we check the length of origins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do it in another pr

Copy link
Member

@rleungx rleungx left a comment

Choose a reason for hiding this comment

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

The rest LGTM except for #3947 (comment)

@lhy1024
Copy link
Contributor Author

lhy1024 commented Aug 4, 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: fef1820

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 4, 2021
@ti-chi-bot ti-chi-bot merged commit 3b920d7 into tikv:master Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/scheduler Scheduler logic. priority/P1 The issue has P1 priority. 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.

5 participants