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

ibuf_add_free_page() is not initializing FIL_PAGE_TYPE first

Details

    Description

      In the function recv_parse_or_apply_log_rec_body() there are debug checks for validating the state of the page when redo log records are being applied. Most notably, FIL_PAGE_TYPE should be set before anything else is being written to the page.

      The function ibuf_add_free_page() is violating this by invoking flst_add_last() before setting FIL_PAGE_TYPE. This bug was noticed during the testing of MDEV-19514.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2019-10-11 11:15:11.0 2019-10-11 11:15:11.017
            marko Marko Mäkelä made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]

            To 10.1, I pushed an additional change that asserts that when flushing pages, the FIL_PAGE_TYPE will be set. The doublewrite buffer creation during bootstrap is violating that, but I added an extra initialization for debug builds.

            All in all, this should not impact non-debug builds at all. For release builds, we are slightly changing the order of redo log records in the mini-transaction of ibuf_add_free_page(). The volume of written redo log should remain unchanged.

            marko Marko Mäkelä added a comment - To 10.1, I pushed an additional change that asserts that when flushing pages, the FIL_PAGE_TYPE will be set. The doublewrite buffer creation during bootstrap is violating that, but I added an extra initialization for debug builds. All in all, this should not impact non-debug builds at all. For release builds, we are slightly changing the order of redo log records in the mini-transaction of ibuf_add_free_page() . The volume of written redo log should remain unchanged.
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 100352 ] MariaDB v4 [ 156849 ]

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.