MySQL Forums
Forum List  »  NDB clusters

MySQL NDB cluster lock
Posted by: Maggie Liu
Date: September 29, 2016 05:14PM

Hello,

We're using MySQL ndb-7.4.10-cluster. One time in our DEV environment, we got lock issue when somebody was trying to drop a table and it just hang waiting for metadata lock. I understand that this is caused by autocommit = off in the code.

What we also noticed that, when the "drop table" is hanging/waiting, all the other new sessions will wait on " ndbcluster global schema lock". This basically make the whole cluster freezing.





mysql> show processlist;
+----+-------------+-----------+--------------------+---------+-------+-------------------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------------+-----------+--------------------+---------+-------+-------------------------------------------+------------------+
| 1 | system user | | | Daemon | 0 | Waiting for event from ndbcluster | NULL |
| 57 | root | localhost | smpvoconfig | Query | 15052 | Waiting for table metadata lock | drop table test |
| 66 | root | localhost | performance_schema | Query | 10337 | Waiting for ndbcluster global schema lock | show tables |
| 67 | root | localhost | ndbinfo | Query | 14368 | Waiting for ndbcluster global schema lock | show tables |
| 71 | root | localhost | NULL | Query | 0 | init | show processlist |
+----+-------------+-----------+--------------------+---------+-------+-------------------------------------------+------------------+



Could you let me know if there's a query to find the blocker so that we can kill it and release the locks?

Looks like ndbinfo.server_operations and ndbinfo.server_transactions shows the sessions waiting for locks. But not showing the blocking sessions.

Thank you

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL NDB cluster lock
787
September 29, 2016 05:14PM
379
October 26, 2016 04:19AM
351
October 27, 2016 11:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.