mercredi 4 mars 2015

pt-table-checksum says there is a difference but pt-table-sync with --print says nothing


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.


Thank you. Do you see any reasons for these events ?





Aucun commentaire:

Enregistrer un commentaire