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

innodb_buffer_pool_wait_free is not protected by mutex

    XMLWordPrintable

Details

    Description

      The underlying variable of the counter innodb_buffer_pool_wait_free is only modified in buf_LRU_get_free_block(), where we could easily do that after acquiring buf_pool.mutex.

      Furthermore, the variable is being duplicated for no good reason:

      	export_vars.innodb_buffer_pool_wait_free =
      		srv_stats.buf_pool_wait_free;
      

      Because this counter should not be in a time-critical execution path, I think that we can replace both of the above variables with buf_pool.stat.LRU_waits, which would be incremented while holding buf_pool.mutex, to make the counter more accurate. I think that we can allow the reads to remain dirty, not acquiring the mutex.

      Attachments

        Issue Links

          Activity

            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.