DDL Fast Timeout
Introduction
In MySQL Community Edition, all DDL operations require an MDL lock. If a DDL operation keeps waiting for such a lock, subsequent DML operations will be blocked.
TaurusDB lets you set an MDL wait time (DDL timeout) for ALTER TABLE, CREATE INDEX, and DROP INDEX operations. This allows these operations to quickly time out if the lock is unavailable, avoiding blocking subsequent DML operations.
Constraints
The kernel version must be 2.0.45.230900 or later.
For details about how to check the kernel version, see How Can I Check the Version of a TaurusDB Instance?
Enabling DDL Fast Timeout
|
Parameter |
Level |
Description |
|
rds_ddl_lock_wait_timeout |
Global, Session |
Defines how long that a DDL operation waits for a lock in the current session or global sessions.
|
Example
- Start a client and add a lock for tables.
Figure 1 Adding a lock
- Run the following command to check the status of the DDL fast timeout function
show variables like "%rds_ddl_lock_wait_timeout%";
Figure 2 Querying the status of the DDL fast timeout function
As shown in the preceding figure, the value of rds_ddl_lock_wait_timeout is 31536000 (default value). The function is disabled. The subsequent operations will wait for a long time.

To enable the function, go to 3.
- Run the following command to set rds_ddl_lock_wait_timeout.
set rds_ddl_lock_wait_timeout=1;
Figure 3 Configuring parameters
- Run the following command to create an index. It is found that the DDL operation times out quickly.
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
