diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index 2ffebbb3..75610d55 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -7177,7 +7177,9 @@ disable the checks. See also L<"--replicate-database">. type: string; group: Throttle -Pause checksumming until the specified slave's lag is less than L<"--max-lag">. +Pause checksumming until this replica's lag is less than L<"--max-lag">. +The value is a DSN that inherits missing L<"DSN OPTIONS"> from the +master host and the connection options (L<"--port">, L<"--user">, etc.). =item --chunk-index @@ -7198,7 +7200,7 @@ type: size; default: 1000 Number of rows to select for each checksum query. Allowable suffixes are k, M, G. -The chunk size is automatically adjusted to satisify L<"--chunk-time"> when +The chunk size is automatically adjusted to satisfy L<"--chunk-time"> when that option is not zero (and it's not by default). In general, the chunk size limits how many rows the tool selects for @@ -7292,7 +7294,7 @@ Delete previous checksums for each table before checksumming the table. This option does not truncate the entire L<"--replicate"> table, it only deletes rows (checksums) for each table right before checksumming the table. Therefore, if checksumming stops prematurely, the L<"--replicate"> -table will still contain rows for tables that were not checksumed before +table will still contain rows for tables that were not checksummed before the tool was stopped. L<"--resume"> disables this option because if previous checksums are @@ -7302,13 +7304,14 @@ deleted then there is nothing to resume. short form: -e; type: hash; group: Filter -Do only this comma-separated list of storage engines. +Only checksum tables which use these storage engines. =item --explain cumulative: yes; default: 0; group: Output -Show, but do not execute, checksum queries (disables L<"--[no]empty-replicate-table">). +Show, but do not execute, checksum queries (disables L<"--[no]empty-replicate-table">). If specified twice, the tables are chunked and the upper and lower +boundary values for each chunk are printed. =item --float-precision @@ -7329,10 +7332,10 @@ type: string Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc). -The default is to use -C, but C and C also work, and you can use your own function, -such as a compiled UDF, if you wish. Whatever function you specify is run in -SQL, not in Perl, so it must be available to MySQL. +The default is to use C, but C and C also work, and you +can use your own function, such as a compiled UDF, if you wish. Whatever +function you specify is run in SQL, not in Perl, so it must be available +to MySQL. The C UDF mentioned in the benchmarks is much faster than C. The C++ source code is distributed with Maatkit. It is very simple to compile and @@ -7398,23 +7401,34 @@ Ignore tables whose names match the Perl regex. type: int; default: 1 -Set innodb_lock_wait_timeout to this value. +Set C to this value on the master host. Setting +C dynamically requires the InnoDB plugin. If +the tool cannot set the variable dynamically, it will print a warning +which lists the current C value. If you +do not want to restart MySQL to change C, you +can specify the current C value listed by the +warning. =item --max-lag type: time; default: 1s; group: Throttle -Pause checksumming if the slave given by L<"--check-slave-lag"> lags. +Pause checksumming until all replicas' lag is less than this value. -This option causes pt-table-checksum to look at slave lag after each checksum. -If the any slave's lag is greater than the option's value, or if the slave -isn't running (so its lag is NULL), pt-table-checksum sleeps for -L<"--check-interval"> seconds and then looks at the lag again. It repeats -until all slaves are caught up, then continues checksumming. +After each checksum query (each chunk), pt-table-checksum looks at the +lag (C) of all replicas discovered automatically +or, if specified, just L<"--check-slave-lag"> and waits until all replicas' +lag is less than this value. If any replica is lagging too much, +pt-table-checksum will sleep for L<"--check-interval"> seconds, then +check all replicas again. -This option is useful to let you checksum data as fast as the slaves can handle -it, assuming the slave you directed pt-table-checksum to monitor is -representative of all the slaves that may be replicating from this server. +The tool waits forever for replicas to stop lagging. If any replica is +stopped, the tool waits forever until the replica is started. Checksumming +continues once all replicas are running and not lagging too much. + +L<"--progress"> reports are printed while waiting. If a replica is stopped, +a progress report is printed immediately, then again at every progress report +interval. =item --max-load @@ -7474,7 +7488,15 @@ checksum differences. default: yes -Re-checksum chunks that L<"--[no]replicate-check"> found to be different. +Check replicas for differences while checksumming tables. + +This is a legacy option which no longer has the same meaning. It is only +used in relation to L<"--[no]replicate-check">. If C<--no-recheck> is +specified, pt-table-checksum only checks replicas for differences and exits. +Else, the tool checks for differences while checksumming tables. + +In other words, if you do not want to checksum tables, and you only want +to check replicas for differences, specify C<--no-recheck>. =item --recurse @@ -7558,7 +7580,6 @@ on the replicas and break replication with "different error on master and slave." This is not a problem with pt-table-checksum; it's a problem with MySQL replication, and you can read more about it in the MySQL manual. - If the slaves have any C<--replicate-do-X> or C<--replicate-ignore-X> options, you should be careful not to checksum any databases or tables that exist on the master and not the slaves. Changes to such tables may not normally be executed @@ -7569,7 +7590,8 @@ slave, and if the table or database you're checksumming does not exist, the queries will cause replication to fail. For more information on replication rules, see L. -The replicate table is never checksummed itself. +The replicate table is never checksummed (the tool automatically adds this +table to L<"--ignore-tables">). =item --[no]replicate-check @@ -7582,7 +7604,7 @@ by L<"--recurse">, and executing a simple C