Details
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
- All
- Comments
- Work Log
- History
- Activity
- Transitions
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