diff --git a/bin/pt-archiver b/bin/pt-archiver index b511e957..4e3d48b7 100755 --- a/bin/pt-archiver +++ b/bin/pt-archiver @@ -4025,8 +4025,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-heartbeat b/bin/pt-heartbeat index c04db3e1..c20273ca 100755 --- a/bin/pt-heartbeat +++ b/bin/pt-heartbeat @@ -486,8 +486,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-kill b/bin/pt-kill index 639b32a5..c401a3ca 100755 --- a/bin/pt-kill +++ b/bin/pt-kill @@ -4302,8 +4302,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index c1296fb6..c9a78474 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -4590,8 +4590,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-query-digest b/bin/pt-query-digest index c4d3a78e..ae98493c 100755 --- a/bin/pt-query-digest +++ b/bin/pt-query-digest @@ -10896,8 +10896,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-replica-find b/bin/pt-replica-find index c6b58836..02e961aa 100755 --- a/bin/pt-replica-find +++ b/bin/pt-replica-find @@ -2627,8 +2627,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-replica-restart b/bin/pt-replica-restart index 481f728f..0dfdb45c 100755 --- a/bin/pt-replica-restart +++ b/bin/pt-replica-restart @@ -3038,8 +3038,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index 1693e5e2..038f26b0 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -5545,8 +5545,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/bin/pt-table-sync b/bin/pt-table-sync index 9b2bce92..eb1d3e12 100755 --- a/bin/pt-table-sync +++ b/bin/pt-table-sync @@ -7057,9 +7057,9 @@ sub is_source_of { } if ( ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for source to send event' ) - || ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for master to send event' ) ) + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { my ( $source_log_name, $source_log_num ) = $source_status->{file} =~ m/^(.*?)\.0*([1-9][0-9]*)$/; diff --git a/lib/MasterSlave.pm b/lib/MasterSlave.pm index 4c92c2d2..8eb69c88 100644 --- a/lib/MasterSlave.pm +++ b/lib/MasterSlave.pm @@ -453,8 +453,10 @@ sub is_source_of { . $replica_status->{"${source_name}_user"}; } - if ( ($replica_status->{replica_io_state} || '') - eq 'Waiting for ${source_name} to send event' ) + if ( ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for source to send event' ) + || ( ($replica_status->{replica_io_state} || '') + eq 'Waiting for master to send event' ) ) { # The replica thinks its I/O thread is caught up to the source. Let's # compare and make sure the source and replica are reasonably close to each