Comment 0 for bug 1042727

Revision history for this message
Baron Schwartz (baron-xaprb) wrote : pt-table-checksum doesn't keep the master DBH alive

When replication is very delayed, pt-table-checksum will not keep its connection to the master alive, and when the replica catches up or if it dies for some reason, we get an error. It looks like this:

================

08-27T09:44:10 Error waiting for the last checksum of table <...> to replicate to replica <...>: DBD::mysql::db selectrow_array failed: MySQL server has gone away [for Statement "SELECT MAX(chunk) FROM `percona`.`checksum` WHERE ... at pt-table-checksum line 8581.

Check that the replica is running and has the replicate table `percona`.`checksum`. Checking the replica for checksum differences will probably cause another error.
08-27T09:44:10 Error checking for checksum differences of table <...> on replica <...>: DBD::mysql::db selectall_arrayref failed: MySQL server has gone away [for Statement "SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `rkdb`.`archivechecksum` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='...' AND tbl='...')"] at pt-table-checksum line 4118.

Check that the replica is running and has the replicate table `percona`.`checksum`.

================

I think the tool needs to do a keepalive SELECT 1 or something like that.