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

Add batch split #6

Merged
merged 15 commits into from
Dec 20, 2018
Prev Previous commit
Next Next commit
address comment
Signed-off-by: Connor1996 <[email protected]>
  • Loading branch information
Connor1996 committed Oct 25, 2018
commit ac7096df256dc66b417a4fbc271770b200977e25
4 changes: 2 additions & 2 deletions text/2018-10-25-batch-split.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Summary

Support `BatchSplit` feature that split one Region into multiple Regions at a time if the size is large enough. This includes modifications of both TiKV and PD. For TiKV, every round of split-check produces not only one split key but multiple split keys and change inner split related interface into batch style. For PD, add RPC `AskBatchSplit` and `ReportBatchSplit` to permit TiKV asking for `region_id` and `peer_id` in batch.
Support `BatchSplit` feature that split one Region into multiple Regions at a time if the size is large enough. This includes modifications of both TiKV and PD. For TiKV, every round of split-check produces multiple split keys instead of one and change inner split related interface into batch style. For PD, add RPC `AskBatchSplit` and `ReportBatchSplit` to permit TiKV asking for `region_id` and `peer_id` in batch.
Connor1996 marked this conversation as resolved.
Show resolved Hide resolved
Connor1996 marked this conversation as resolved.
Show resolved Hide resolved

# Motivation

Expand Down Expand Up @@ -54,7 +54,7 @@ message ReportBatchSplitResponse {
}
```

Add `AskBatchSplit` to replace `AskSplit` , it is called when TiKV produces some split keys for one Region and asks PD to allocate new `region_id` and `peer_id` for that Region. `split_count` in `AskBatchSplitRequest` indicates the number of Region to be generated, and `AskBatchSplitResponse` returns all new allocated ids to TiKV.
Add `AskBatchSplit` to replace `AskSplit` , it is called when TiKV produces some split keys for one Region and asks PD to allocate new `region_id` and `peer_id` for that Region. `split_count` in `AskBatchSplitRequest` indicates the number of Region to be generated, and `AskBatchSplitResponse` returns all new allocated IDs to TiKV.
Connor1996 marked this conversation as resolved.
Show resolved Hide resolved

Add `ReportBatchSplit` to replace `ReportBatchSplit`, it is called when TiKV finish splitting Region. `ReportBatchSplitRequest` takes all metas of new generated Region for PD to update PD's related information.
Connor1996 marked this conversation as resolved.
Show resolved Hide resolved

Expand Down