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
lightning: auto adjust dynamic region configuration #34537
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/820cdee5e6ca0af05061b87959878c54bce50293 |
/cc @gozssky @dsdashun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
/run-integration-br-test |
/run-unit-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
if regionSplitKeys == 0 { | ||
if regionSplitSize > int64(config.SplitRegionSize) { | ||
regionSplitKeys = int64(float64(regionSplitSize) / float64(config.SplitRegionSize) * float64(config.SplitRegionKeys)) | ||
} else { | ||
regionSplitKeys = int64(config.SplitRegionKeys) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those code seems more like adjusting, maybe move into config.Adjust()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These codes are adjusting. However it's a bit hard to put them in config.Adjust()
because some extra instances are needed. Maybe left a TODO here and refactor this in the next PR?
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 820cdee
|
/run-integration-br-test |
/run-integration-br-test https://ci.pingcap.net/job/tidb_ghpr_integration_br_test/9187/display/redirect |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: close #34536
Problem Summary:
What is changed and how it works?
auto adjust dynamic region configuration according to tikv's configuration.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.