Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
12.3
-
Can result in unexpected behaviour
Description
MDEV-32570 added fragmentation of large row events. When binlog compression is enabled (log_bin_compress=ON), the compression is bypassed, and these binary log events remain as regular row events, when they should be compressed row events.
This is because the compression happens during the Log_event::write() function, whereas row data fragmentation happens before Log_event::write() is called. The Rows_log_event super-class stores the row data buffers to be written to disk. The regular Rows_log_event sub-classes's implementations of Log_event::write() write this data as-is. The compressed sub-classes's implementation of ::write() over-write these buffers with the compressed rows data before writing to disk.
To fragment a large row event, the server fragments the Rows_log_event's row data buffers, to be written by multiple Partial_rows_log_event}}s, and each {{Partial_rows_log_event::write() call writes its portion of the row data buffer to disk. However, this happens before compression ever has a chance to take place, and thereby, an event that should be compressed, never is.
This results in unexpectedly large binlog files and network bandwidth, as the data won't be compressed.
Attachments
Issue Links
- is caused by
-
MDEV-32570 Fragment ROW replication events larger than max_packet_size
-
- Closed
-
- relates to
-
MDEV-40768 Slave cannot apply a fragmented row event written with log_bin_compress=ON
-
- Open
-