Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.3
-
Can result in hang or crash
-
Q1/2027 Replic. Maintenance
Description
On a primary with log_bin_compress=ON and
binlog_row_event_fragment_threshold set below the size of the row
events it writes, a replica can stop when it applies one of those
events. The replica's SQL thread stops with
ER_SLAVE_RELAY_LOG_READ_FAILURE (1594) and the message "Could not parse
Rows_log_event re-assembled from Partial_rows_log_events". The
transaction never applies, and restarting the SQL thread meets the same
event again, so replication resumes only once the event is skipped.
Whether a given statement trips this depends on the contents of the
first row in the event, so the same INSERT can replicate against one
table and stop the replica against another.
A row event whose row data exceeds binlog_row_event_fragment_threshold
is not written as a single event. Rows_log_event_fragmenter splits it
into a group of Partial_rows_log_events. The first fragment carries the
original event's header, post-header and metadata, the rest carry the
remaining row data, and the replica concatenates the group and parses
the result as the original row event. Fragmenting takes the place of
writing the row event rather than running after it, so the row data in
the fragments is whatever sits in the event's buffer, which is
uncompressed.
--source include/have_binlog_format_row.inc
|
--source include/master-slave.inc
|
|
|
call mtr.add_suppression("Found invalid event in binary log");
|
call mtr.add_suppression("Could not parse Rows_log_event re-assembled");
|
|
|
--connection master
|
set @@global.log_bin_compress= 1;
|
set @@global.binlog_row_event_fragment_threshold= 1024;
|
|
|
create table t1 (c1 int, c2 int, c3 varchar(2000),
|
c4 int, c5 int, c6 int, c7 int, c8 int);
|
|
|
# First byte of the row data is the first row's null bitmap, 0x81 here
|
insert into t1 values (NULL, 1, repeat('x', 1100), 1, 1, 1, 1, NULL);
|
|
|
--connection slave
|
--let $slave_sql_errno= 1594
|
--source include/wait_for_slave_sql_error.inc
|
Attachments
Issue Links
- causes
-
MDEV-32570 Fragment ROW replication events larger than max_packet_size
-
- Closed
-
- relates to
-
MDEV-40851 Fragmented Compressed Row Events Aren't Actually Compressed
-
- Open
-