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

Log noise: "MDL conflict db=%s table=%s ticket=%d solved by abort"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.0.16
    • Fix Version/s: N/A
    • Component/s: Galera, Locking
    • Labels:
      None

      Description

      We are getting very frequent log noise in the style of:

      Jun 30 12:48:08 node03 mysqld: 150630 12:48:08 [Note] WSREP: MDL conflict db=xxxschema table=xxxTableName ticket=7 solved by abort
      

      After investigation I concluded that these log messages are misleading (nothing is "aborted" - just blocked for a little bit) - in addition to very noisy. They only occur with MariaDB Galera - stock MariaDB does not emit such noise.

      I can reproce it with 2 sessions against the same MariaDB Galera cluster node:

      Session 1 Session 2
      set autocommit=0;  
      LOCK TABLES SomeTable WRITE;  
        SELECT * FROM SomeTable - this will hang and the message appears in the log.
      UNLOCK TABLES;  
        this session is unleashed again

      Looking at the code sql/mdl.cc, this is a message which is emitted when the 2nd session is forced to wait.

      Thus it is an indication of lock contention, and not an error. Since the thread is forced to wait, and no errors occur, database consistency is preserved.

      In our case the message is frequent as our app does LOCK TABLE.

      Can the logging level of this message be reduced to DEBUG ? The non-galera MySQL build is quiet under the same circumstances, and the log message is not really wsrep specific.

      At the very least, can we avoid the usage of the word "abort" - this indicates a problem where there is none...

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Hi Karl E. Jørgensen : These messages can be skipped by turning off wsrep_log_conflicts.

            https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_log_conflicts

            Show
            nirbhay_c Nirbhay Choubey added a comment - Hi Karl E. Jørgensen : These messages can be skipped by turning off wsrep_log_conflicts. https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_log_conflicts

              People

              • Assignee:
                nirbhay_c Nirbhay Choubey
                Reporter:
                jorginator Karl E. Jørgensen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: