Metadata Locks
Metadata locks (MDLs) are used to ensure consistency between DDL and DML operations. Executing DDL statements on a table generates metadata write locks. If there is a metadata lock, all subsequent SELECT, DML, and DDL operations on the table will be blocked, causing a connection backlog.
Metadata locks are displayed in real time. You can quickly identify problems and terminate the sessions with metadata locks to restore blocked operations.
Precautions
- This function does not support DML locks. You can view and analyze them on the InnoDB Locks page.
- Metadata locks are used only in MySQL 5.6 and 5.7.
- A maximum of 1,000 records can be displayed.
Procedure
- Log in to the DAS console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner, and under Databases, click Data Admin Service.
- In the navigation pane, choose Intelligent O&M > Instance List.
Alternatively, on the Overview page, click Go to Intelligent O&M.
- In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.
Figure 1 Searching for instances
- Locate the box containing your target instance and click Details.
- In the upper right corner of the page, click Go to Old Edition.
- Choose Locks and Transactions > Metadata Locks.
- Select a lock status and type, enter a database name, table name, and session ID as needed, and click Query.
- In the query result, check whether there are sessions that hold MDL locks. If yes, select the sessions as required and click Kill.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot