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
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