Merge pull request #7 from percona/pt-osc-sleep-option-lp1413140

pt-osc: added --sleep option. Useful when load or lag checking is not…
This commit is contained in:
Frank Cizmich
2015-08-20 15:09:45 -04:00

View File

@@ -9265,6 +9265,12 @@ sub main {
$sys_load_pr->start() if $sys_load_pr;
$sys_load->wait(Progress => $sys_load_pr);
# sleep between chunks to avoid overloading PXC nodes
my $sleep = $args{NibbleIterator}->{OptionParser}->get('sleep');
if ( $sleep ) {
sleep $sleep;
}
return;
},
done => sub {
@@ -11500,6 +11506,15 @@ value of C<10000>.
The tool prints a warning and continues if a variable cannot be set.
=item --sleep
type: float; default: 0
How long to sleep (in seconds) after copying each chunk. This option is useful
when throttling by L<"--max-lag"> and L<"--max-load"> are not possible.
A small, sub-second value should be used, like 0.1, else the tool could take
a very long time to copy large tables.
=item --socket
short form: -S; type: string