pt-table-sync on master-master replication usage help

Good day everyone

I am hoping someone can assist me here.

I have always used pt-table-checksum to verify integrity on master-slave replication and we had our own processes in place to sync those.

However, I recently started looking at someone else’s databases and came across pt-table-sync option.

I do have some questions regarding the use of pt-table-sync however before I run this in order to ensure I do not overwrite data due to incorrect usage.

The databases is in a master-master replication setup and while syncing the tables , the replication from master2 back to master1 has been disabled temporarily.

I have run pt-table-checksum and have a list of databases and tables that are out of sync.

I now need to run pt-table-sync to actually synchronize the tables, however here are my questions / concerns :

  1. on which one of the hosts do I actually run the pt-table-sync command? (master2 is the database that is mostly out of sync)
  2. Despite the dry_run option as per the command below (will change to execute once I am happy with the command, or even to print and then process output from there) , is the command I have below correct?

pt-table-sync --dry-run --wait=0 --sync-to-master h=<ip of master2 [slave]>,u=checksum_user,p= --replicate percona.checksums

I would really appreciate the help here as I have not used this tool before and thus very cautious.

Regards

Good day all,

I have since posting tried and tested the command ensuring that I create backups on both servers to be safe.

It seems that it needs to be run on the slave server (master2) , however I still get cases where the pt-table sync ran but no changes were made to the slave db tables.

in most cases the tables are updated to be in sync, however there are a few tables that I have found were not updated at all.

Any ideas what would cause this.

Regards