-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: split and scatter regions in batches #33625
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/c1ae0712575fba6e8cf56b5fe4db6fcfa418a394 |
/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
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.
LGTM
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.
LGTM
/run-integration-br-test |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: bb620a0
|
/run-mysql-test |
/run-cla |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.3 in PR #34257 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.4 in PR #34258 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-6.0 in PR #34259 |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: close #33618
Problem Summary:
Region scatter may timeout when split and scatter many regions at a time.
What is changed and how it works?
Add a batch limit for split and scatter regions. In a batch, lightning processes up to 4096 ranges. After all ranges in batch have been processed completely, lightning can process the next batch.
Check List
Tests
I prepared about 1.8T data for a table which contains only one clustered primary key. TiDB cluster have ten TiKV nodes, each node have 200% cpu limit and 16GiB memory limit. Then I used lightning to import these data to TiDB cluster and observed the scatter operator status in grafana dashboard. To reproduce huge amount of regions, I set
region-split-size
to 8MiB. Finally, about 260k regions were created.Master
Many scatter operator is timeout.
This PR
There is no operator timeout after this PR.
Release note