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

lock_wait_timeout has no effect when slave_parallel_mode!=none

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.1.19
    • N/A
    • Locking, Replication
    • None
    • Ubuntu LTS 16

    Description

      Running on a slave server, with slave_parallel_mode set to "conservative" and another process with an active lock, lock_wait_timeout won't have any effect.

      How to reproduce:

      1. Create a replicating slave with incoming data
      2. Make sure slave_parallel_mode is set to "conservative" (maybe other modes than none will cause the same problem, but I haven't tested it)
      3. Create a global lock

        FLUSH TABLES WITH READ LOCK;
        

      4. Start another mysql session and do

        set lock_wait_timeout=1;  FLUSH TABLES WITH READ LOCK;
        

      Result:
      The flush command will hang (maybe until the previous lock is released)
      When looking at the processlist, the flush command will hang in the "Waiting for worker threads to pause for global read lock" state.

      Expected:
      The flush command should timeout like this:

      MariaDB [(none)]> set global lock_wait_timeout=1;  FLUSH TABLES WITH READ LOCK;
      Query OK, 0 rows affected (0.00 sec)
       
      ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
      

      Workaround:

      stop slave;
      slave_parallel_mode=none;
      start slave;
      

      Attachments

        Activity

          People

            knielsen Kristian Nielsen
            sorenk Søren Kröger
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.