-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
store/tikv: pre-split regions during 2PC to avoid hotspot (#16920) #16959
Conversation
/run-all-tests |
/run-integration-copr-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.
LGTM
/rebuild |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@sre-bot merge failed. |
/merge |
/run-all-tests |
@sre-bot merge failed. |
/merge |
/run-all-tests |
@sre-bot merge failed. |
/run-integration-copr-test |
/run-all-tests |
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
cherry-pick #16920 to release-4.0
What problem does this PR solve?
Issue Number: close #16573
Problem Summary:
Pre-split region before it become a writing hotspot to avoid the TiKV 'server is busy' error.
What is changed and how it works?
What's Changed:
Pre-split the region during 2PC if we detect there are many mutations into one region.
How it Works:
Call the
store.SplitRegions
andstore.WaitScatterRegionFinish
API.Related changes
Check List
Tests
http://172.16.4.61:13000/d/000000011/test-cluster-tidb?orgId=1&from=1588073060157&to=1588082547757
Release note
During the two phase commit process, if there are a lot of mutations within a single region, pre-split that region to avoid hotspot.