-
Notifications
You must be signed in to change notification settings - Fork 66
backend: split and ingest region size more precise #369
Conversation
sad for the code coverage decrease, the new logic for split need large scale test data |
I'm not sure what's the implementation in this PR, but a kind reminder: In TiKV there are two region split methods, by size and by number of keys. When size or number of keys exceed the threshold the region will be splited. In lightning we'd better respect both mechanism, to avoid too many keys (which will also slow down the scanning). |
Thanks for the reminder. I update the split regions by take both size in bytes and key-value count into account. |
/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.
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
What problem does this PR solve?
try to resolve #365 by avoid writing and ingesting big regions
What is changed and how it works?
make ingest region size not exceed
regionSplitSize
by:This pr also emit some useless logs to make the error and warn logs less annoying.
Check List
Tests
Side effects
Related changes