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

Reduce redo log volume for undo tablespace initialization

Details

    Description

      The function trx_rseg_header_create() is emitting a large amount of low-level redo log records for initializing an array of data to FIL_NULL (0xff bytes). In MDEV-13564, the mini-transaction log size for initializing an undo tablespace exceeds 1 megabyte, triggering some warnings and requiring a slightly bigger buffer pool size to avoid a hang during crash recovery.

      We should introduce higher-level redo log record types for initializing undo log tablespaces. Ultimately, related to MDEV-14425 we should introduce a redo log format that only encodes a page number at most once per mini-transaction, instead of encoding it for every single operation. The introduction of redo log record types will require updating the redo log format tag, and thus prevent a crash-downgrade to earlier versions.

      Attachments

        Issue Links

          Activity

            When implementing a new redo log format tag, we must allow downgrade from a clean redo log to earlier versions (10.2 and 10.3), similar to how it was done in MDEV-14909 to allow downgrade from 10.3 to 10.2.

            marko Marko Mäkelä added a comment - When implementing a new redo log format tag, we must allow downgrade from a clean redo log to earlier versions (10.2 and 10.3), similar to how it was done in MDEV-14909 to allow downgrade from 10.3 to 10.2.

            With a MLOG_MEMSET operation that I implemented, the mtr.m_impl->m_log.size() in trx_purge_truncate_history() reduced from 694,372 bytes to 37,348 bytes for innodb_page_size=16k. This operation can also be used for reducing the redo log volume for flst_init() on zero-initialized pages, and for replacing the combination of memset() and mlog_log_string().

            marko Marko Mäkelä added a comment - With a MLOG_MEMSET operation that I implemented, the mtr.m_impl->m_log.size() in trx_purge_truncate_history() reduced from 694,372 bytes to 37,348 bytes for innodb_page_size=16k . This operation can also be used for reducing the redo log volume for flst_init() on zero-initialized pages, and for replacing the combination of memset() and mlog_log_string() .

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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