Skip to content

Commit

Permalink
More fixes for low-offset checkpoints
Browse files Browse the repository at this point in the history
Previous commit did fix the problem, but only one check related to it.

This commit fixed the checks in 2 more places (that should be all).
  • Loading branch information
Hubert depesz Lubaczewski committed Jun 4, 2011
1 parent 9e7d84a commit 0f91c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OmniPITR/Program/Backup/Slave.pm
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,15 @@ sub wait_for_checkpoint_from_backup_label {

$self->log->fatal( 'Cannot get checkpoint lines from: %s', $self->{ 'backup_file_data' } ) if 1 != scalar @checkpoint_lines;

my ( $major, $minor ) = $checkpoint_lines[ 0 ] =~ m{ \s+ ( [a-f0-9]+ ) / ( [a-f0-9]{8} ) \s* \z }xmsi;
my ( $major, $minor ) = $checkpoint_lines[ 0 ] =~ m{ \s+ ( [a-f0-9]+ ) / ( [a-f0-9]{1,8} ) \s* \z }xmsi;
$major = hex $major;
$minor = hex $minor;

$self->log->log( 'Waiting for checkpoint (based on backup_label from master) - %s', $checkpoint_lines[ 0 ] ) if $self->verbose;
while ( 1 ) {
my $temp = $self->get_control_data();

my ( $c_major, $c_minor ) = $temp->{ 'Latest checkpoint location' } =~ m{ \A ( [a-f0-9]+ ) / ( [a-f0-9]{8} ) \s* \z }xmsi;
my ( $c_major, $c_minor ) = $temp->{ 'Latest checkpoint location' } =~ m{ \A ( [a-f0-9]+ ) / ( [a-f0-9]{1,8} ) \s* \z }xmsi;
$c_major = hex $c_major;
$c_minor = hex $c_minor;

Expand Down

0 comments on commit 0f91c3e

Please sign in to comment.