-
Notifications
You must be signed in to change notification settings - Fork 721
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
Throttle TiKV's total region count in allocate IDs #6850
Comments
Why not directly manage it by TiKV itself since TiKV has the region count info? And it also reduces one gRPC call. |
TiKV itself can do that too, but there's no extra follow ups to recover from it. Essentially that TiKV will not be able to split forever if no further action happens. We need to introduce other mechanism to notify PD that this TiKV has trouble now. In PD, once it detects region split is throttled in that tikv, then it can immediately schedule region balance to recover from it. PD has global view and thus it's easy to implement such logic. |
The concept of limiting the number of regions per TiKV can be further expanded
Considerations for implementation:
|
there are some condition that region can't be merged, such as:
and some api may split too many peer, this api should be limit. |
Btw,the region-max-size can also be controlled by pd. Region should be merge if this region has no loads on it , and be split if this region is bigger and hot. TIKV don't care about the region size limit. |
Development Task
Today it's necessary to limit the region count per TiKV, such as memory consumption.
In either raftstore v1 or v2 (partitioned-raft-kv), one tikv has a specific limit of region counts.
We probably want to fail the allocate ID when the total region count per TiKV exceeds a specific threshold. For v1, it can be 100K per 32GB, For v2, it can be 5K per 32GB.
The text was updated successfully, but these errors were encountered: