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

SELECT transation get's stuck temporally related to OPTIMIZATION MetaData Lock

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5.13
    • None
    • Locking
    • None
    • RHEL8

    Description

      We have a nightly process that optimizes specific high update rate tables. At the same time, and synchronous to that optimization process, select queries come in very frequently.

      There are cases, where a query that should run about 2-5 seconds will get stuck indefinitely. These queries come in just before, and possibly nano or milliseconds before an optimization statement, which imposes a METADATA LOCK on all the pending selects against the table, including possibly this one, or maybe not. We are not sure.

      However, once the METADATA LOCK clears, the query will be shown in running mode, but in fact it is not running. There was a bug resolved in 10.5.16 associated with a missed flagging/unflagging of certain queries during some replication based events that sounded so similar, that I thought this issue would be resolved by that update. Unfortunately, this turned out to not be the case.

      We are still seeing the selects that appear to be running, but in fact are not happening approximately once a week. I suspect that it's a temporal issue related to the flagging/unflagging of METADATA LOCKS that is causing the issue. That MariaDB unlocks the select from the users perspective, but it remains in fact locked from an internals perspective.

      Attachments

        1. global_status.txt
          15 kB
        2. global_variables.txt
          19 kB
        3. my.cnf
          8 kB

        Activity

          People

            lstartseva Lena Startseva
            TheWitness Larry Adams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.