tencent cloud

Feedback

Nonblocking DDL

Last updated: 2024-10-09 10:31:57

    Feature Overview

    During execution of a DML statement, if a metadata lock (MDL) is held, it will block DDL operations for the corresponding table and then block all subsequent DML statements, possibly consuming a large amount of thread resources. To prevent this case, TDSQL-C for MySQL introduces a Nonblocking DDL mechanism, protecting the system from being stalled by DDL operations waiting for MDL locks. When a DDL operation is blocked by a DML statement, subsequent DML statements will not further get blocked due to waiting for an MDL lock.

    Supported Versions

    The kernel version should be 3.1.15 or later for TXSQL 8.0.

    Applicable Scenarios

    It is applicable to scenarios where an MDL lock held during execution of a DML statement may block DDL operations for the corresponding table and then block all subsequent DML statements.

    Use Instructions

    Parameter Name
    Dynamic
    Type
    Default Value
    Valid Values/Value Range
    Description
    txsql_nonblock_ddl
    yes
    bool
    false
    true/false
    Whether to enable the Nonblocking DDL feature.
    txsql_nonblock_ddl_retry_times
    yes
    ulong
    1
    0-ulong_max
    Retry count after a DDL operation is blocked by an MDL lock. The default value is 1.
    txsql_nonblock_ddl_retry_interval
    yes
    ulong
    2
    0-ulong_max
    Retry interval after a DDL operation is blocked by an MDL lock. The default value is 2s.
    Note:
    Some uncommon DDL operations may not be covered. In these scenarios, if a DDL operation is blocked by a DML statement, the system will directly return Lock wait timeout.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support