pt-table-checksum on non-replication scenario to compare databases without checking replication lag with --no-check-slave-lag option
I replicated a database with mysql. The source and target databases do not have master and slave relationship. After the replication, I would like to check if all of the tables within a schema are identical.
it is proposed to specified the slaves with --recursion-method. This method encounters two problems:
(a) It checks the existence of percona.checksums table on "slaves" and wait forever. The issue can be resolved by manually creating the table.
(b) The tool insists checking the replication lag as shown below:
$ PTDEBUG=0 pt-table-checksum --recursion-method dsn=h=127.
Replica ip-10-0-0-1 is stopped. Waiting.
Replica ip-10-0-0-1 is stopped. Waiting.
As this is not real replication, there is no replication lag applicable, and the tool waits forever. There is no way to disable this check as documented below:
4. Lag
After each chunk, pt-table-checksum checks the lag on all replicas,
or only the replica specified by "--check-
the tool not to overload the replicas with checksum data. There is
no way to disable this check, but you can specify a single replica
to check with "--check-
fastest, it will help prevent the tool from waiting too long for
replica lag to abate.
I understand the tool was written for master-slave situation, but I believe the purpose I want to achieve is more basic and should be covered. Maybe I want to verify the two databases are identical before I turn on replication. I am asking for a workaround to achieve my purpose, or an enhancement --no-check-
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Muhammad Irfan
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by