diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index b1acdb68..b906b012 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -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