pt-table-sync consumes lots of memory

Hi,

I run pt-table-checksum on a regular basis to make sure master and slaves are consistent. When there are differences I run pt-table-sync to bring slaves back into identical state as master. The pt-table-sync tool works most of the time but there are times it starts consuming lots of memory (in the order of GBs) and ends up being killed by the OOM killer in linux. This seems to be happening even with a checksum difference of a single chunk.

Here’s the exact params I’m using in the slave host:

pt-table-sync --sync-to-master h=localhost,u=sync_user,p=<user_password> --replicate mon.checksums --set-vars wait_timeout=24000 --wait 120 --verbose --execute

I’ve also tried passing in the following two params: --buffer-in-mysql --buffer-to-client

Both commands above resulted in the same behavior, the process running out of memory.

Has anyone ran into this issue? Any recommendations on how to approach it? Am I doing something incorrect?

Thanks!