pt-table-checksum requires recursion when working with and XtraDB Cluster node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Frank Cizmich |
Bug Description
I'm trying to use pt-table-checksum to checksum the tables on an XtraDB Cluster setup; I don't need it to actually check the results because we have our own system in place to examine the results in percona.checksums. What I need the tool to do is to connect to a node, run the queries to checksum the data and put the results into percona.checksums, and have these queries replicated across to the other nodes so that I can see if the data on the other nodes differs.
As a minimal test case, I've set up a MySQL sandbox with a cluster inside, and then run a command as follows:
$ pt-table-checksum S=/tmp/
<hostname> is a cluster node but no other nodes or regular replicas were found. Use --recursion-
This is not the behaviour I have anticipated, so I'm reporting it as a bug. I have in fact managed to patch the tool to let it run through; the patch is attached as 'pt-table-
Related branches
- Daniel Nichter: Needs Fixing
-
Diff: 66 lines (+24/-7)2 files modifiedbin/pt-table-checksum (+12/-6)
t/pt-table-checksum/pxc.t (+12/-1)
Changed in percona-toolkit: | |
status: | Confirmed → In Progress |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.2.12 |
importance: | Undecided → Medium |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Hi Andrey,
To use pt-table-checksum on a cluster you have to specify a "--recursion- method" .
This must be either "cluster" or "dsn".
If you set it to "none" the tool will not try to discover any other node. I suspect that with your fix, the tool ran without error, but was unable to find any differences because it didn't find the other nodes.
The easiest method to use is --recursion- method= cluster , since this will autodiscover all the other nodes; BUT... you must make sure that every node has a distinct server_id, otherwise , repeated server_id's will be discarded!
( very soon we'll post a fix for this, but for the moment the server_id's must be different )
The other method is "dsn", which is a bit more involved and requires creating a table with information about the addresses of all the nodes and informing the tool the location of that table via the dsn parameter. Same restriction applies though, server_id's must be different!
You can find info about this here: www.percona. com/doc/ percona- toolkit/ 2.2/pt- table-checksum. html#cmdoption- pt-table- checksum- -recursion- method
http://