pt-osc: added --sleep option. Useful when load or lag checking is not possible

This commit is contained in:
frank-cizmich
2015-05-13 14:31:43 -03:00
parent 66c74af47b
commit cb4048a2e0

View File

@@ -9260,6 +9260,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 {
@@ -11495,6 +11501,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