-
Notifications
You must be signed in to change notification settings - Fork 85
dump: always split TiDB v3.* tables through tidb rowid to save TiDB's memory #301
Conversation
@kennytm PTAL |
v4/export/dump.go
Outdated
} | ||
|
||
// for sorting | ||
type byIntValue []int64 |
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.
How about using sort.Slice
?
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.
fixed
@@ -0,0 +1,990 @@ | |||
4,"","7480000000000000FF0500000000000000F8" |
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.
what's this?
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.
It's region info read from TiDB. This is built by creating a table, inserting data and select * from information_schema.tikv_region_status
. These three columns are region_id, start_key, end_key separately.
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.
oh it's test fixtures
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 62c52a8
|
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #306. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #307. |
In response to a cherrypick label: new pull request created: #308. |
What problem does this PR solve?
fix #295, an extension of #273
In TiDB v3.x:
SHOW TABLE REGIONS
statement.tidb_decode_key
function.What is changed and how it works?
Split chunks by
PKIsHandle
for TiDB v3.*. Make sure TiDB won't OOM through splitting tables by rowids.We do some staff by our own to solve the problem that tidb lacks some info.
Check List
Tests
Test dump with v3.0.0. The result is looks expected.
Related changes
Release note