Comment 8 for bug 1113301

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

=item --retries

type: int; default: 10

Retry critical operations and recover from non-fatal errors. The tool
retries these operations:

   Creating triggers
   Dropping triggers
   Copying chunks
   Swapping tables
   Rebuilding foreign key constraints

For creating and dropping triggers, the number of retries applies to each
C<CREATE TRIGGER> and C<DROP TRIGGER> statement for each trigger.
For copying chunks, the number of retries applies to each chunk, not the
entire table. For swapping tables, the number of retries usually applies
once because there is usually only one C<RENAME TABLE> statement.
For rebuilding foreign key constraints, the number of retries applies to
each statment (C<ALTER> statements for the C<rebuild_constraints>
L<"--alter-foreign-keys-method">; other statements for the C<drop_swap>
method).

The tool retries each operation if these errors occur:

   Lock wait timeout (innod_lock_wait_timeout and lock_wait_timeout)
   Deadlock found
   Query is killed (KILL QUERY <thread_id>)
   Connection is killed (KILL CONNECTION <thread_id)
   Lost connection to MySQL

In the case of lost and killed connections, the tool will automatically
reconnect.

To alter extremely busy tables, it may be necessary to increase L<"--retries">,
and also C<innodb_lock_wait_timeout> and (for MySQL 5.5 and newer)
C<lock_wait_timeout> by specifying higher values with L<"--set-vars">.

Failures and retries are recorded in the L<"--statistics">.