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

AliSQL: [Perf] Issue#21 SPLIT LOCK_GRANT LOCK

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Do
    • N/A
    • Server
    • None

    Description

      Description:
      ------------
      LOCK_grant is a rwlock:
        wrlock when modify privileges
        rdlock when check privileges
      The fact is that we usually check priv at most scenarios, but has serious conflict.
       
      Solution:
      ---------
      So we split the LOCK_grant into an array of rwlock:
        Require one rdlock when checking priv through thread_id % array_size.
        Require all wrlock when modify priv.
       
      It will decrease the rdlock conflict substantially.
      

      https://github.com/alibaba/AliSQL/commit/70bb6170ed0a4100b97d325c25d9604b10523197

      Attachments

        Activity

          plinux, Monty should have optimised away locking of LOCK_grant in many scenarios a while ago. Could you check if it works for you?

          I believe it was done in this patch: https://github.com/MariaDB/server/commit/d8986fd6c3b69d2970e66684e1d00dd603fc9ab7

          svoj Sergey Vojtovich added a comment - plinux , Monty should have optimised away locking of LOCK_grant in many scenarios a while ago. Could you check if it works for you? I believe it was done in this patch: https://github.com/MariaDB/server/commit/d8986fd6c3b69d2970e66684e1d00dd603fc9ab7
          plinux Lixun Peng added a comment -

          svoj I confirmed that MariaDB needn't this patch.

          plinux Lixun Peng added a comment - svoj I confirmed that MariaDB needn't this patch.

          People

            plinux Lixun Peng
            svoj Sergey Vojtovich
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.