Feature Description
tdsql_lock_wait_timeout specifies the lock timeout duration for the TDStore engine, in seconds.
In a database system, the system needs to coordinate and manage data to ensure data consistency and integrity. A lock is a mechanism for ensuring data consistency. It prevents multiple transactions from simultaneously accessing and modifying the same data, thereby avoiding data inconsistency.
For example, if the timeout is set to 10 seconds, the system waits for a maximum of 10 seconds when a transaction attempts to obtain a lock that is already held by another transaction. If the lock is not released within this period, the system throws a timeout exception, indicating that the lock wait has timed out. This ensures data consistency and integrity, preventing errors and performance degradation caused by lock wait timeouts.
This parameter is limited by the tdsql_tdstore_rpc_timeout parameter. When tdsql_lock_wait_timeout (after conversion to milliseconds) is greater than or equal to tdsql_tdstore_rpc_timeout, the system automatically adjusts tdsql_lock_wait_timeout to 80% of tdsql_tdstore_rpc_timeout. For example, if tdsql_tdstore_rpc_timeout is 100000ms (100s) and tdsql_lock_wait_timeout is 200s (200000ms), the effective lock wait timeout is 100000 × 80% = 80000ms (80s).
Attribute Description
|
Parameter Type | ULONGLONG |
Default Value | 10 |
Value Range | 1 ~ 1073741824 |
Effective Scope | GLOBAL SESSION |
Restart Required | No |