pt-table-sync - Called not_in_left in state 0 at /usr/bin/pt-table-sync


We have an automated sync job set up using pt-table-sync v2.2.1 on a RHEL 5.10 box. Occasionaly we get the following error (mainly for this one table):

Called not_in_left in state 0 at /usr/bin/pt-table-sync line 5122. while doing . on

Ive tried adjusting between Chunk and Nibble algorithms, as well as adjusting the --chunk-size (from 1000 default to 100, and even down to 10) for this specific table of ~54000 rows. The table doesn’t get updated very frequently, and when I run the job manually with PTDEBUG on, I don’t see any obvious errors.

Does anyone have any ideas on what might be causing this? Any common causes of this error that you are aware of?

Here is the command that is being run:

/usr/bin/pt-table-sync --print --lock 0 --no-check-slave --no-foreign-key-checks --chunk-size 100 --execute u=,p=h=,D=,t=


Thanks for all your help,

I suspect that the program encountered an error during the checksum stage, like deadlock, lock wait timeout, so the state(0) value didn’t get updated. Then at the sync stage, it detected the improper state(0) and failed. As you mentioned, the error only happens occasionally, that is probably why you didn’t find anything when run it with PTDEBUG. I can only suggest to try a couple more runs with PTDEBUG till you catch the error again.