Skip to content

Commit

Permalink
Update text/2018-10-25-batch-split.md
Browse files Browse the repository at this point in the history
Co-Authored-By: Connor1996 <zbk602423539@gmail.com>
  • Loading branch information
CaitinChen and Connor1996 authored Nov 2, 2018
1 parent b4404d8 commit aa2ea7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text/2018-10-25-batch-split.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Now we have four split-checkers: half, keys, size and table. SizeChecker and Key
The general logic of SizeChecker and KeysChecker are similiar, the only difference between them is one splits Region based on size and the other splits Region based on the number of keys. So here we mainly describe the logic of SizeChecker:

- before: it scans key-value pairs in a Region's range sequentially to accumlate their size as `total_size` and stops once the size reachs to `region_max_size` or scans to the end of range. If `total_size` is smaller than `region_max_size` at the end, checker wouldn't produce any split key; if not, it regards the very key at which `total_size` reachs to `region_split_size` as split key.
- after: it scans key-value pairs in a Region's range sequentially to accumlate their size as `total_size` and stops once the size reachs to `region_split_size * (batch_split_limit-1) + region_max_size` or scans to the end of range. During the scan process, it reocrds the key as split key every `region_split_size`, but after finishing scanning, it may discards the last split key if the size of rest Region doesn't over `region_max_size - region_split_size`. With this algorithm, if `batch_split_limit` is set to 1, TiKV can perfectly behave as before that split without batch.
- after: it scans key-value pairs in a Region's range sequentially to accumulate their size as `total_size` and stops once the size reaches `region_split_size * (batch_split_limit-1) + region_max_size` or scans to the end of the range. During the scan process, it records the key as split key every `region_split_size`, but after finishing scanning, it may discard the last split key if the size of rest Region is not bigger than `region_max_size - region_split_size`. With this algorithm, if `batch_split_limit` is set to 1, TiKV can perfectly behave the same way as the split without batch.

### Compatibility concern

Expand Down

0 comments on commit aa2ea7c

Please sign in to comment.