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

checker: avoid to merge region with high qps #3805

Closed
wants to merge 1 commit into from

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jun 21, 2021

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

What problem does this PR solve?

avoid to merge region with high qps

Check List

Tests

  • Unit test
  • Integration test

Release note

checker: avoid to merge region with high qps

Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 21, 2021
@lhy1024 lhy1024 added the component/checker Checker logic. label Jun 21, 2021
@codecov
Copy link

codecov bot commented Jun 21, 2021

Codecov Report

Merging #3805 (366b90b) into master (7039dab) will increase coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3805      +/-   ##
==========================================
+ Coverage   75.03%   75.04%   +0.01%     
==========================================
  Files         245      245              
  Lines       24597    24604       +7     
==========================================
+ Hits        18456    18464       +8     
+ Misses       4518     4517       -1     
  Partials     1623     1623              
Flag Coverage Δ
unittests 75.04% <85.71%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
pkg/mock/mockcluster/config.go 96.77% <0.00%> (-3.23%) ⬇️
server/config/config.go 74.94% <100.00%> (+0.10%) ⬆️
server/config/persist_options.go 92.60% <100.00%> (+1.20%) ⬆️
server/schedule/checker/merge_checker.go 76.66% <100.00%> (+0.80%) ⬆️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
server/statistics/hot_cache_task.go 75.00% <0.00%> (-4.17%) ⬇️
pkg/etcdutil/etcdutil.go 84.70% <0.00%> (-3.53%) ⬇️
server/tso/tso.go 70.78% <0.00%> (-2.25%) ⬇️
server/schedulers/utils.go 93.90% <0.00%> (-1.02%) ⬇️
server/core/storage.go 67.68% <0.00%> (-0.77%) ⬇️
... and 16 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 7039dab...366b90b. Read the comment docs.

@@ -634,6 +634,8 @@ type ScheduleConfig struct {
MaxMergeRegionKeys uint64 `toml:"max-merge-region-keys" json:"max-merge-region-keys"`
// SplitMergeInterval is the minimum interval time to permit merge after split.
SplitMergeInterval typeutil.Duration `toml:"split-merge-interval" json:"split-merge-interval"`
// SplitQPSThreshold is the qps threshold for split region.
SplitQPSThreshold uint64 `toml:"split-qps-threshold" json:"split-qps-threshold"`
Copy link
Contributor

Choose a reason for hiding this comment

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

can we know this from TiKV? I think we can use ConfigManager.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How to use ConfigManager?And I think we can also get StoreHeartbeatInterval and RegionHeartbeatInterval from it.

Copy link
Member

Choose a reason for hiding this comment

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

What if this threshold is not the same between PD and TiKV?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the pd threshold is higher than the tikv threshold, some regions may not be merged as expected, and conversely, some regions that were just split by qps may be merged again, so we expect them to be the same, or not much different

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • disksing

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 status/LGT1 Indicates that a PR has LGTM 1. label Jun 23, 2021
@disksing
Copy link
Contributor

I think we need some document update.

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 30, 2021

Considering that qps will be used as the dimension for reading hotspot scheduling and that the merge checker will skip regions already identified as hotspots, this pr is unnecessary and I will close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/checker Checker logic. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants