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

Unnecessary wait in InnoDB crash recovery

    XMLWordPrintable

Details

    Description

      As noted in MDEV-14481, there is an unnecessary wait and some dead code in the function recv_sys_t::apply(). Before the function buf_page_get_low() can return, it must acquire an exclusive page latch, and the page must have been read. If the page is being read by another thread, that other thread would already have read-fixed and X-latched the page. Furthermore, before buf_page_read_complete() would return, it would have invoked recv_recover_page() to apply any redo log to the page, before releasing the page latch.

      It actually suffices to simply call recv_read_in_area() in order to trigger a transition from page_recv_t::RECV_NOT_PROCESSED to page_recv_t::RECV_BEING_READ for the current block and possibly some following page numbers.

      This dead code seems to be present in all InnoDB versions. I think that this is only feasible to fix in 10.5 or later versions, thanks to code simplification that was performed in MDEV-19586, MDEV-21351 and many other tickets.

      Attachments

        Issue Links

          Activity

            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.