Details

    Description

      InnoDB maintains an internal persistent sequence of transaction identifiers. This sequence is used for assigning both transaction start identifiers (DB_TRX_ID=trx->id) and end identifiers (trx->no) as well as end identifiers for the mysql.transaction_registry table that was introduced in MDEV-12894.

      Every 256th update of the sequence would cause a write to the TRX_SYS page. We can completely avoid accessing the TRX_SYS page if we modify the InnoDB startup so that resurrecting the sequence from other pages of the transaction system.

      It turns out that startup is not reading the undo log pages of of committed transactions. In order not to cause additional page accesses on startup, we must persist trx_sys.get_max_trx_id() in the rollback segment header pages. On startup, we will simply pick up the maximum value. This page format change will be identified by repurposing an existing field TRX_RSEG_MAX_SIZE and writing it as zero. This change has the convenient side effect that after a downgrade to an older version of MariaDB and MySQL, no transactions can be created.

      On transaction commit, we will still write some binlog and Galera WSREP XID information to the TRX_SYS page. If these features are disabled, the TRX_SYS page will not be accessed at all outside server startup or undo log tablespace truncation.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            Epic Link MDEV-14442 [ 64369 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2018-01-31 08:54:40.0 2018-01-31 08:54:40.048
            marko Marko Mäkelä made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 85320 ] MariaDB v4 [ 133457 ]
            marko Marko Mäkelä made changes -

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 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.