DDL Fast Timeout
For some specific DDL operations, you can configure their metadata lock (MDL) waiting time, preventing subsequent DML operations from being blocked.
Constraints
- The kernel version is 2.0.45.230900 or later.
- Currently, the following DDL operations are supported: ALTER TABLE, CREATE INDEX, and DROP INDEX.
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 function, referring 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