Merged tablesync-precedence-issue

This commit is contained in:
Brian Fraser
2012-08-24 19:58:16 -03:00
2 changed files with 6 additions and 4 deletions

View File

@@ -6111,9 +6111,10 @@ sub lock_and_wait {
my $ms = $self->{MasterSlave};
my $tries = $args{wait_retry_args}->{tries} || 3;
my $wait;
my $sleep = $args{wait_retry_args}->{wait} || 10;
$self->{Retry}->retry(
tries => $tries,
wait => sub { sleep $args{wait_retry_args}->{wait} || 10 },
wait => sub { sleep($sleep) },
try => sub {
my ( %args ) = @_;
@@ -6144,7 +6145,7 @@ sub lock_and_wait {
. "the slave is running.";
}
if ( $tries - $args{tryno} ) {
$msg .= " Sleeping $wait seconds then retrying "
$msg .= " Sleeping $sleep seconds then retrying "
. ($tries - $args{tryno}) . " more times.";
}
warn "$msg\n";

View File

@@ -513,9 +513,10 @@ sub lock_and_wait {
my $ms = $self->{MasterSlave};
my $tries = $args{wait_retry_args}->{tries} || 3;
my $wait;
my $sleep = $args{wait_retry_args}->{wait} || 10;
$self->{Retry}->retry(
tries => $tries,
wait => sub { sleep $args{wait_retry_args}->{wait} || 10 },
wait => sub { sleep($sleep) },
try => sub {
my ( %args ) = @_;
# Be careful using $args{...} in this callback! %args in
@@ -558,7 +559,7 @@ sub lock_and_wait {
. "the slave is running.";
}
if ( $tries - $args{tryno} ) {
$msg .= " Sleeping $wait seconds then retrying "
$msg .= " Sleeping $sleep seconds then retrying "
. ($tries - $args{tryno}) . " more times.";
}
warn "$msg\n";