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

3 way lock : ALTER, MDL, BACKUP STAGE BLOCK_DDL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.4.1
    • 10.4.1
    • Locking
    • None

    Description

      Here is an unexpected wait with "Backup locks" (similar to the one described in MDEV-15636, FTWRL-related, but Backup locks were supposed to be better than FTWRL, and be instant in most cases) Backup locks was supposed not to wait for SELECTs, or ALTER in progress, but in this case, it does. Moreover, in the case below, it waits until the end of a transaction, while no DDL, DML or SELECT is currently running (even if example has a DDL command, it is waiting and it did not start to run yet).

      create table t1(i int) engine innodb;

      • Connection 1 ( Acquire MDL lock)

      MariaDB [test]> start transaction;
      Query OK, 0 rows affected (0.000 sec)

      MariaDB [test]> select 1 from t1; # <-- acquires MDL lock
      Empty set (0.001 sec)

      • Connection 2 (ALTER TABLE)

      MariaDB [test]> alter table t1 add column (j int); # <-- waits on MDL

      • Connection 3 (BACKUP STAGE ...)

      MariaDB [(none)]> backup stage start;
      Query OK, 0 rows affected (0.000 sec)

      MariaDB [(none)]> backup stage flush;
      Query OK, 0 rows affected (0.002 sec)

      MariaDB [(none)]> backup stage block_ddl; # <-- waits on something

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              wlad Vladislav Vaintroub
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.