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

Document possible LOCK_TYPE values for metadata locks

    XMLWordPrintable

    Details

      Description

      MariaDB 10.5 introduced yet another way to monitor metadata lock, via performance_schema.metadata_locks table. MySQL manual (https://dev.mysql.com/doc/refman/5.7/en/performance-schema-metadata-locks-table.html) can be used to find out what is presented there, but unfortunately there are different/new metadata lock types introduced in MariaDB and one may get the output like this:

      MariaDB [performance_schema]> select * from metadata_locks limit 5\G
      *************************** 1. row ***************************
                OBJECT_TYPE: TABLE
              OBJECT_SCHEMA: sbtest
                OBJECT_NAME: sbtest1
      OBJECT_INSTANCE_BEGIN: 140032787904800
                  LOCK_TYPE: SHARED_WRITE
              LOCK_DURATION: TRANSACTION
                LOCK_STATUS: GRANTED
                     SOURCE:
            OWNER_THREAD_ID: 34
             OWNER_EVENT_ID: 1
      *************************** 2. row ***************************
                OBJECT_TYPE: BACKUP
              OBJECT_SCHEMA: NULL
                OBJECT_NAME: NULL
      OBJECT_INSTANCE_BEGIN: 140032778203712
                  LOCK_TYPE: BACKUP_TRANS_DML
              LOCK_DURATION: STATEMENT
                LOCK_STATUS: GRANTED
                     SOURCE:
            OWNER_THREAD_ID: 34
             OWNER_EVENT_ID: 1
      *************************** 3. row ***************************
                OBJECT_TYPE: TABLE
              OBJECT_SCHEMA: sbtest
                OBJECT_NAME: sbtest1
      OBJECT_INSTANCE_BEGIN: 140033249782768
                  LOCK_TYPE: SHARED_WRITE
              LOCK_DURATION: TRANSACTION
                LOCK_STATUS: GRANTED
                     SOURCE:
            OWNER_THREAD_ID: 33
             OWNER_EVENT_ID: 1
      *************************** 4. row ***************************
                OBJECT_TYPE: BACKUP
              OBJECT_SCHEMA: NULL
                OBJECT_NAME: NULL
      OBJECT_INSTANCE_BEGIN: 140033248057584
                  LOCK_TYPE: BACKUP_TRANS_DML
              LOCK_DURATION: STATEMENT
                LOCK_STATUS: GRANTED
                     SOURCE:
            OWNER_THREAD_ID: 33
             OWNER_EVENT_ID: 1
      *************************** 5. row ***************************
                OBJECT_TYPE: TABLE
              OBJECT_SCHEMA: sbtest
                OBJECT_NAME: sbtest1
      OBJECT_INSTANCE_BEGIN: 140033449398688
                  LOCK_TYPE: SHARED_WRITE
              LOCK_DURATION: TRANSACTION
                LOCK_STATUS: GRANTED
                     SOURCE:
            OWNER_THREAD_ID: 32
             OWNER_EVENT_ID: 1
      5 rows in set (0,001 sec)
      

      that includes BACKUP_TRANS_DML, BACKUP_START, BACKUP_FTWRL1 etc types of locks with OBJECT_TYPE =- BACKUP that upstream documentation does not cover in any way.

      This is a request to properly document the content of this new P_S table, including all object rypes and all types of metadata locks with compatibility matrix for them if possible.

        Attachments

          Activity

            People

            Assignee:
            greenman Ian Gilfillan
            Reporter:
            valerii Valerii Kravchuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration