diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 03eb75c1459b2..8cf4ce9cffe5b 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1174,11 +1174,17 @@ Configuration items related to `import` ### `wait-for-lock-timeout` -- The max time that a pessimistic transaction in TiKV waits for other transactions to release the lock, in milliseconds. If timed out, an error is returned to TiDB, and TiDB retries to add a lock. The lock wait timeout is set by `innodb_lock_wait_timeout`. -- Default value: 1000 -- Minimum value: 1 +- The longest time that a pessimistic transaction in TiKV waits for other transactions to release the lock. If the time is out, an error is returned to TiDB, and TiDB retries to add a lock. The lock wait timeout is set by `innodb_lock_wait_timeout`. +- Default value: 1 s +- Minimum value: 1 ms ### `wait-up-delay-duration` -- When pessimistic transactions release the lock, among all the transactions waiting for lock, only the transaction with the smallest `start ts` is woken up. Other transactions will be woken up after `wait-up-delay-duration` milliseconds. -- Default value: 20 +- When pessimistic transactions release the lock, among all the transactions waiting for lock, only the transaction with the smallest `start_ts` is woken up. Other transactions will be woken up after `wait-up-delay-duration`. +- Default value: 20 ms + +### `pipelined` + +This configuration item enables the pipelined process of adding the pessimistic lock. With this feature enabled, after detecting that data can be locked, TiKV immediately notifies TiDB to execute the subsequent requests and write the pessimistic lock asynchronously, which reduces most of the latency and significantly improves the performance of pessimistic transactions. But there is a still low probability that the asynchronous write of the pessimistic lock fails, which might cause the failure of pessimistic transaction commits. + +The default value of `pipelined` is `false`.