pt-table-sync char-chunking works despite docs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Triaged
|
Undecided
|
Unassigned |
Bug Description
the document says
Note that this algorithm will not work if chunking a char column where all the values start with the same character. In that case, the tool will exit and suggest picking a different algorithm.
i have a try,
mysql> desc za;
+------
| Field | Type | Null | Key | Default | Extra |
+------
| id | char(20) | YES | UNI | NULL | |
+------
1 row in set (0.00 sec)
mysql> select * from za limit 5;
+------------+
| id |
+------------+
| abc008LV |
| abc00tpYxz |
| abc00tQz |
| abc00uUaSp |
| abc01cFv |
+------------+
5 rows in set (0.00 sec)
so, can found the prefix of a row ,begins with abc,oppose to the document says, i think the tool will use nibble ALGORITHM,
# TableSyncer:5807 8903 Getting best plugin
# TableSyncer:5809 8903 Trying plugin Chunk
# TableChunker:3703 8903 Possible chunk indexes in order: un_id
# TableChunker:3723 8903 Exact chunkable: id on un_id
# TableChunker:3727 8903 Ordering columns by order in tbl, PK first
# TableChunker:3740 8903 Chunkable columns: id on un_id
# TableChunker:3741 8903 Can chunk exactly: 1
# TableSyncChunk:5028 8903 Can chunk on column id using index un_id
# TableSyncer:5812 8903 Can sync with Chunk $VAR1 = {
# chunk_col => 'id',
# chunk_index => 'un_id'
# };
you can see, it used chunk algorithm , could explain ?
tags: | added: chunking pt-table-sync |
summary: |
- choose a ALGORITHM about table sync + pt-table-sync char-chunking works despite docs |
Changed in percona-toolkit: | |
status: | New → Triaged |
I am getting the following message from pt-table-sync 2.2.13
Failed to prepare TableSyncChunk plugin: Cannot chunk table using the character column channelguid, most likely because all values start with the same character. This table must be synced separately by specifying a list of --algorithms without the Chunk algorithm at pt-table-sync line 4049.
The channelguid column is the PK and is char(36) NOT NULL with table DEFAULT CHARSET=utf8
The values in the channelguid column start will hex 0-f inclusive.