Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40851

Fragmented Compressed Row Events Aren't Actually Compressed

    XMLWordPrintable

Details

    • 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

          Activity

            People

              bnestere Brandon Nesterenko
              bnestere Brandon Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Time Spent - 1h Remaining Estimate - 3d
                  3d
                  Logged:
                  Time Spent - 1h Remaining Estimate - 3d
                  1h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.