I am using pt-table-checksum to ensure master-slave is synchronized.
When I run pt-table-checksum, I see some differences on employee_profile.trigger_log but when I use pt-table-sync with --print, I see nothing.
I resolved some differences on some tables with pt-table-sync but when I re-test with pt-table-checksum, this tool still says there is a difference.
So what is the problem with pt-table-checksum ? Is is accuracy ?
[UPDATE]
I use
pt-table-checksum -h <masterip> -u <the_user> -p '<passwd of the user>' --recursion-method dsn=h=<slaveip>,P=3306,u=<the_userr>,p=<passwd of the user>,D=check_db,t=dsns --nocheck-binlog-format --set-vars innodb_lock_wait_timeout=50 > ~/stats_check_db_<slaveip>.txt
After that, I run command to filter:
cat ~/stats_check_db_<slaveip>.txt | awk '{print "*"$3"*" " -- " $8}' | grep -Fv "*0*"
This is output:
*DIFFS* -- TABLE
*1* -- mysql.user
*1* -- employee_profile.entry
*1* -- employee_profile.ip
*1* -- employee_profile.thread
When I run pt-table-sync:
pt-table-sync --print h=<slaveip>,P=3306,u=<the user>,p=<passwd of the user> --sync-to-master --databases employee_profile --tables entry
I see nothing. After a while, when I re-check with pt-table-checksum, I don't see difference on employee_profile.entry
For a resolved table, I still see some differences on next re-check. These are disappeared from result of pt-table-checksum on the third checksum.
[UPDATE 2]
I am using percona toolkit version 2.2.13 - lastest version on http://www.percona.com/
I reviewed all implementations of db server that I did checksum. These are old implementation of mysql or mariadb that someone built them.
I see the problem just appear when the implementation between master and slave is different such as master is MariaDB 5.5.34 and slave is MariaDB 5.5.37 (I see false positive error: Cannot nibble table because MySQL chose no index instead of the PRIMARY index - just ignore it and then execute pt-table-sync) or master is mysql 5.5.35 and slave is mysql 5.5.37 (I see pt-table-checksum says there is a difference but pt-table-sync --print says nothing - just re-test for sure).
I think it is a reason for false positive errors.
Thank you so much !
--replicate-check-only
, lower chunk size).