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

btr_page_reorganize_low() uses the buffer pool just to obtain a scratch block

    XMLWordPrintable

Details

    Description

      btr_page_reorganize_low() (and page_zip_reorganize()) needs a scratch/temporary block to perform the page reorganization (to compact the records in a page).
      Currently, this block is allocated from the buffer pool and freed at the end of the function.
      This means that the function needs to obtain at least twice the buffer pool mutex to do so.
      In addition, any wait for buffer pool mutex here would be done while holding the page X-latch, further delaying at least any queued reader of the same page.

      Scratch blocks could be carved out of another storage, which I called btr_scratch_pool_t in one experimental commit, that has its own synchronization mechanisms and allow to not pollute the main buffer pool mutex for scratch blocks handling.
      Only users (threads) of the new storage would collide with each other.

      Attachments

        Issue Links

          Activity

            People

              alessandro.vetere Alessandro Vetere
              alessandro.vetere Alessandro Vetere
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 5d
                  5d
                  Remaining:
                  Time Spent - 2d 5.25h Remaining Estimate - 2d 2.75h
                  2d 2.75h
                  Logged:
                  Time Spent - 2d 5.25h Remaining Estimate - 2d 2.75h
                  2d 5.25h

                  Git Integration

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