pt-table-checksum doesn't warn if no slaves are found

Reported by Daniel Nichter on 2012-12-07
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit
Medium
Daniel Nichter

Bug Description

pt-table-checksum doesn't warn if no slaves are found. For PXC clusters it does, but not for regular replication. This can lead to misleading results because a master is always consistent with itself. The tool should really at least warn if no slaves are found so the user knows that --recursion-method (i.e. auto-slave finding) failed and the results aren't really useful.

Changed in percona-toolkit:
assignee: nobody → Daniel Nichter (daniel-nichter)
status: Triaged → Fix Committed
Daniel Nichter (daniel-nichter) wrote :

If no slaves are found, and recursion-method is not "none", and --quiet < 2, then this warning is printed and exit status is non-zero:

"Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information."

I thought about making the tool die at this point so it doesn't do a bunch of useless work, but it could happen that slaves do exist but aren't found, so checksums do replicate, then the user can --replicate-check-only later to see if there are diffs.

I think non-zero exit status is correct because some users may be checking it rather than the output, in which case this will indicate that despite zero diffs, there was a problem that explains why there are zero diffs.

Changed in percona-toolkit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers