Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-3017

LP #1219833: Redundant page state re-checks in buf_LRU_free_from_unzip_LRU_list() and buf_LRU_free_from_common_LRU_list()

    Details

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 19-05-2014 05:29:14

      buf_LRU_free_from_unzip_LRU_list() is always called with the LRU list mutex held but contains the following, slightly reduced:

      for (block = UT_LIST_GET_LAST(buf_pool->unzip_LRU);
      UNIV_LIKELY(block != NULL);
      block = UT_LIST_GET_PREV(unzip_LRU, block)) {

      mutex_enter(&block->mutex);
      if (!block->in_unzip_LRU_list || !block->page.in_LRU_list

      buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE) { mutex_exit(&block->mutex); goto restart; }

      The if statement is redundant. Neither one of the three conditions checked there may change while the LRU mutex is held, and it's not being released here.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: