Changeset 235

Show
Ignore:
Timestamp:
04/23/11 20:25:50 (7 years ago)
Author:
depesz
Message:

fix parsing of checkpoint locations

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/omnipitr-with-slave-backups-calling-master/lib/OmniPITR/Program/Backup/Slave.pm

    r234 r235  
    338338    my $self = shift; 
    339339 
    340     my @checkpoint_lines = grep { m{\ACHECKPOINT\s+LOCATION:\s+[a-f0-9]+/[0-9a-f]{8}\s*\z} } @{ $self->{ 'backup_file_data' } }; 
     340    my @checkpoint_lines = grep { m{\ACHECKPOINT\s+LOCATION:\s+[a-f0-9]+/[0-9a-f]{8}\s*\z}i } @{ $self->{ 'backup_file_data' } }; 
    341341 
    342342    $self->log->fatal( 'Cannot get checkpoint lines from: %s', $self->{ 'backup_file_data' } ) if 1 != scalar @checkpoint_lines; 
    343343 
    344     my ( $major, $minor ) = $checkpoint_lines[ 0 ] =~ m{ \s+ ( [a-f0-9]+ ) / ( [a-f0-9]{8} ) \s* \z }xms
     344    my ( $major, $minor ) = $checkpoint_lines[ 0 ] =~ m{ \s+ ( [a-f0-9]+ ) / ( [a-f0-9]{8} ) \s* \z }xmsi
    345345    $major = hex $major; 
    346346    $minor = hex $minor; 
    347347 
    348     $self->log->log( 'Waiting for checkpoint (based on backup_label from master)' ) if $self->verbose; 
     348    $self->log->log( 'Waiting for checkpoint (based on backup_label from master) - %s', $checkpoint_lines[ 0 ] ) if $self->verbose; 
    349349    while ( 1 ) { 
    350350        my $temp = $self->get_control_data(); 
    351351 
    352         my ( $c_major, $c_minor ) = $temp->{ 'Latest checkpoint location' } =~ m{ \s+ ( [a-f0-9]+ ) / ( [a-f0-9]{8} ) \s* \z }xms
     352        my ( $c_major, $c_minor ) = $temp->{ 'Latest checkpoint location' } =~ m{ \A ( [a-f0-9]+ ) / ( [a-f0-9]{8} ) \s* \z }xmsi
    353353        $c_major = hex $c_major; 
    354354        $c_minor = hex $c_minor;