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

Merge InnoDB: fix index->lock contention from MySQL 5.7

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 10.2
    • Component/s: None
    • Labels:

      Description

      revno: 6232 
      revno: 6233
      revno: 6902
        - WL#6326 : InnoDB: fix index->lock contention
      

      The acquisition of node pointer page latches is protected by index->lock latch.Currently, index->lock protected all node pointer pages either in S or X mode, and no individual block->lock were acquired on node pointer pages. With this fix, node pointer pages are protected by individual block->lock, S-latch or X-latch. The acquisition of node pointer page latches is covered by index->lock, for preventing deadlocks.

      InnoDB internally uses rw-lock implementation to keep consistency of internal
      resources. Basically the rw-lock has 2 types S-lock (shared) and X-lock (exluded).
      The fix adds the new type SX-lock (shared excluded) for room to optimize
      concurrency and improve scalability more.

      At least, S-lock and X-lock behave same, and compatible for current code. So,
      nothing changed by only this fix as it is. (no functional/performance changes
      for users)

      The new state SX-lock will be used by the future work. (e.g. WL#6326: InnoDB:
      fix index->lock contention)

        new state of rw_lock: SX-lock
              | S|SX| X|
            --+--+--+--+
             S| o| o| x|
            --+--+--+--+
            SX| o| x| x|
            --+--+--+--+
             X| x| x| x|
            --+--+--+--+
        

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  jplindst Jan Lindström
                  Reporter:
                  jplindst Jan Lindström
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 week
                    1w
                    Remaining:
                    Remaining Estimate - 1 week
                    1w
                    Logged:
                    Time Spent - Not Specified
                    Not Specified