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

buf::Block_hint is a performance hog

    XMLWordPrintable

Details

    Description

      The class buf::Block_hint that was added in order to fix MDEV-23693 is an unnecessary performance hog that causes unnecessary lookups on buf_pool.page_hash.

      Originally, I was thinking that this function could be removed as part of rewriting the buffer pool resizing in MDEV-29445, but it turns out that we can do it independently of that. We only need to add a field btr_pcur_t::old_page_id to remember the page identifier where the persistent cursor position was stored, and pass this identifier to buf_page_optimistic_get(), which will have to perform a buf_pool.page_hash lookup anyway.

      Furthermore, in btr_pcur_optimistic_latch_leaves() we had better look up the current page normally, and perform some tricks to prevent a deadlock when acquiring a latch on the previous page, if needed. This will also allow us to simplify the function btr_pcur_move_backward_from_page().

      Attachments

        Issue Links

          Activity

            People

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