Bug #107371 slave error: Slave I/O for channel '': Unexpected master's heartbeat data
Submitted: 23 May 2022 11:12 Modified: 23 May 2022 12:28
Reporter: bin wang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:Ver 8.0, 5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[23 May 2022 11:12] bin wang
Description:
when binlog_format=ROW  and a transaction contains data more than 4GB, then slave IO thread is No, 
there are 
"[ERROR] Slave I/O for channel '': Unexpected master's heartbeat data: heartbeat is not compatible with local info; the event's data: log_file_name mysql-bin.001106ùÁò! log_pos 46933325695, Error_code: 1623
[ERROR] Slave I/O for channel '': Relay log write failure: could not queue event from master, Error_code: 1595" 
in the Slave error log.
Need DBA  start the  slave IO thread and restart data  sync.
MySQL master-slave  can not handle a huge transaction  with binlog_format=ROW.

How to repeat:
dd if=/dev/zero of=data.test bs=1 count=0 seek=1GB;
insert into t value (LOAD_FILE('data.test'));
insert into t value (LOAD_FILE('data.test'));
insert into t value (LOAD_FILE('data.test'));
insert into t value (LOAD_FILE('data.test'));
insert into t value (LOAD_FILE('data.test'));
session1

begin;
insert into t1 value select * from t;
session2
begin;
insert into t2 value select * from t;

session1 and 2 commit at the same time 

show  slave status\G;
.......
Slave_IO_Running:NO
.........
Last_IO_Error: Relay log write failure: could not queue event from master
slave Error log
 [ERROR] Slave I/O for channel '': Unexpected master's heartbeat data: heartbeat is not compatible with local info; the event's data: log_file_name mysql-bin.001106ùÁò! log_pos 3786704376, Error_code: 1623
[ERROR] Slave I/O for channel '': Relay log write failure: could not queue event from master, Error_code: 1595
 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.

Suggested fix:
change the format log_event header in write binlog of master
and binlog in reading and changing binlog  in slave .
Binlog.cc
Binlog_event.cpp
Binlog_event.h
Log_event.cc
Log_event.h
Observer_server_actions.h
Rpl_binlog_sender.cc/.h
Rpl_handler.cc/.h
Rpl_mi.h
Rpl_replica.cc
Rpl_replica_util_options.cc
Rpl_rli.cc
Rpl_rli_pdb.cc/.h
Semisync_source_plugin.cc
[23 May 2022 11:28] bin wang
suggested add  patch

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: 107371.patch (application/octet-stream, text), 34.46 KiB.

[23 May 2022 12:28] MySQL Verification Team
Hello bin wang,

Thank you for the report and contribution.

regards,
Umesh
[23 May 2022 12:28] MySQL Verification Team
Also, see Bug #55231