mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-18 08:24:06 +00:00
Merged tablesync-precedence-issue
This commit is contained in:
@@ -6111,9 +6111,10 @@ sub lock_and_wait {
|
|||||||
my $ms = $self->{MasterSlave};
|
my $ms = $self->{MasterSlave};
|
||||||
my $tries = $args{wait_retry_args}->{tries} || 3;
|
my $tries = $args{wait_retry_args}->{tries} || 3;
|
||||||
my $wait;
|
my $wait;
|
||||||
|
my $sleep = $args{wait_retry_args}->{wait} || 10;
|
||||||
$self->{Retry}->retry(
|
$self->{Retry}->retry(
|
||||||
tries => $tries,
|
tries => $tries,
|
||||||
wait => sub { sleep $args{wait_retry_args}->{wait} || 10 },
|
wait => sub { sleep($sleep) },
|
||||||
try => sub {
|
try => sub {
|
||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
|
|
||||||
@@ -6144,7 +6145,7 @@ sub lock_and_wait {
|
|||||||
. "the slave is running.";
|
. "the slave is running.";
|
||||||
}
|
}
|
||||||
if ( $tries - $args{tryno} ) {
|
if ( $tries - $args{tryno} ) {
|
||||||
$msg .= " Sleeping $wait seconds then retrying "
|
$msg .= " Sleeping $sleep seconds then retrying "
|
||||||
. ($tries - $args{tryno}) . " more times.";
|
. ($tries - $args{tryno}) . " more times.";
|
||||||
}
|
}
|
||||||
warn "$msg\n";
|
warn "$msg\n";
|
||||||
|
@@ -513,9 +513,10 @@ sub lock_and_wait {
|
|||||||
my $ms = $self->{MasterSlave};
|
my $ms = $self->{MasterSlave};
|
||||||
my $tries = $args{wait_retry_args}->{tries} || 3;
|
my $tries = $args{wait_retry_args}->{tries} || 3;
|
||||||
my $wait;
|
my $wait;
|
||||||
|
my $sleep = $args{wait_retry_args}->{wait} || 10;
|
||||||
$self->{Retry}->retry(
|
$self->{Retry}->retry(
|
||||||
tries => $tries,
|
tries => $tries,
|
||||||
wait => sub { sleep $args{wait_retry_args}->{wait} || 10 },
|
wait => sub { sleep($sleep) },
|
||||||
try => sub {
|
try => sub {
|
||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
# Be careful using $args{...} in this callback! %args in
|
# Be careful using $args{...} in this callback! %args in
|
||||||
@@ -558,7 +559,7 @@ sub lock_and_wait {
|
|||||||
. "the slave is running.";
|
. "the slave is running.";
|
||||||
}
|
}
|
||||||
if ( $tries - $args{tryno} ) {
|
if ( $tries - $args{tryno} ) {
|
||||||
$msg .= " Sleeping $wait seconds then retrying "
|
$msg .= " Sleeping $sleep seconds then retrying "
|
||||||
. ($tries - $args{tryno}) . " more times.";
|
. ($tries - $args{tryno}) . " more times.";
|
||||||
}
|
}
|
||||||
warn "$msg\n";
|
warn "$msg\n";
|
||||||
|
Reference in New Issue
Block a user