Issues

Select view

Select search mode

 
22 of 22

LP #1229086: pt-table-sync char-chunking works despite docs

Description

**Reported in Launchpad by snowave last update 27-02-2015 18:36:34

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 abcoppose to the document says i think the tool will use nibble ALGORITHM,

  1. TableSyncer:5807 8903 Getting best plugin

  2. TableSyncer:5809 8903 Trying plugin Chunk

  3. TableChunker:3703 8903 Possible chunk indexes in order: un_id

  4. TableChunker:3723 8903 Exact chunkable: id on un_id

  5. TableChunker:3727 8903 Ordering columns by order in tbl, PK first

  6. TableChunker:3740 8903 Chunkable columns: id on un_id

  7. TableChunker:3741 8903 Can chunk exactly: 1

  8. TableSyncChunk:5028 8903 Can chunk on column id using index un_id

  9. TableSyncer:5812 8903 Can sync with Chunk $VAR1 = {

  10. chunk_col => 'id',

  11. chunk_index => 'un_id'

  12. };

you can see, it used chunk algorithm , could explain ?

Environment

None

Smart Checklist

Details

Assignee

Reporter

Priority

Fix versions

Smart Checklist

Created January 24, 2018 at 7:47 PM
Updated January 15, 2024 at 11:40 AM

Activity

lpjirasyncJanuary 24, 2018 at 7:47 PM

**Comment from Launchpad by: monty solomon on: 27-02-2015 18:36:33

pt-table-checksum does not complain about the table.

lpjirasyncJanuary 24, 2018 at 7:47 PM

**Comment from Launchpad by: monty solomon on: 27-02-2015 11:34:07

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.

Flag notifications