Project

General

Profile

Actions

Support #1564

closed

mysql 5.5 metadata lock

Added by Anchi Cheng over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/21/2012
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 2.1.0

Description

From Tom Dolafi:

In 5.5 we experience waits on metadata locks. It appears that running the microscope runs ddl statements "CREATE TABLE IF NOT EXISTS". Is there a way to turn ddl verification off? As described below, in 5.5 locks last the entire session and not per statement as is in 5.1.

Mysql session:
123456 | user | xxxxxx.xxx.org:56789 | dbemdata | Query | 55 | Waiting for table metadata lock | CREATE TABLE IF NOT EXISTS `dbemdata`.`SessionData` (`DEF_id` int(16) NOT NULL AUTO_INCREMENT, `DEF_timestamp` timestamp NOT NULL, `name` TEXT NULL, `REF|UserData|user` INT NULL DEFAULT NULL, `image path` TEXT NULL, `comment` TEXT NULL, `REF|GridHolderData|holder` INT NULL DEFAULT NULL, PRIMARY KEY (`DEF_id`), KEY `DEF_timestamp` (`DEF_timestamp`), KEY `REF|UserData|user` (`REF|UserData|user`), KEY `REF|GridHolderData|holder` (`REF|GridHolderData|holder`)) ENGINE=MyISAM |

Reference in mysql server:
http://dev.mysql.com/doc/refman/5.5/en/metadata-locking.html

As of MySQL 5.5.3, the server achieves this by acquiring metadata locks on tables used within a transaction and deferring release of those locks until the transaction ends.
…..
Before MySQL 5.5.3, when a transaction acquired a metadata lock for a table used within a statement, it released the lock at the end of the statement.

Thanks,
Tom

I asked what was the reason for the upgrade, and here is his answer:

My motivation to upgrade versions was based on Oracle's support structure. Oracle stopped 5.0 development July 2011, and announced End-Of-Life support Jan 2012. I suspect we will see the same with 5.1 this year. Oracle is pushing 5.5, and has started the releases of 5.6. At some point we will need the capability to migrate to a supported version of mysql. Resolving the metadata lock is a first step. On our next attempt to upgrade we will need more testing time to ensure everything behaves appropriately.

Actions

Also available in: Atom PDF