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

lock_move_reorganize_page() takes exclusive lock_sys.latch via LockMutexGuard

    XMLWordPrintable

Details

    Description

      lock_move_reorganize_page() only touches record locks belonging to a single page, all of which live in one lock_sys.rec_hash cell. It nonetheless write-latches the global lock_sys.latch via LockMutexGuard, blocking every concurrent lock_sys.rd_lock() acquirer (e.g. lock_rec_lock(), lock_table()) server-wide for the whole reorganize (in case locks are present).

      commit 983df00 downgrades LockMutexGuard to LockGuard (shared lock_sys.latch + exclusive latch on the page's cell). An exclusive cell latch is sufficient: it protects the cell's lock chain, the lock bitmaps, and lock->type_mode (including LOCK_WAIT). The per-iteration trx->mutex that already guards lock_rec_add_to_queue() continues to protect each trx's trx_locks list and lock_heap.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 3d
                  3d
                  Remaining:
                  Remaining Estimate - 3d
                  3d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

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