From 41fabd3d0da94ae65905d07f18f4f770e7d5a25d Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 18 Jun 2020 15:12:43 +0800 Subject: [PATCH 1/5] Update tikv-configuration-file.md --- tikv-configuration-file.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 5e5f030b8e42c..612d60666e61a 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1174,11 +1174,16 @@ 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: 1s +- Minimum value: 1ms ### `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: 20ms + +### `pipelined` + ++ 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. ++ Default value: false From 95ed03ade8021e147b41d47c5ad248718277c68a Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:34:50 +0800 Subject: [PATCH 2/5] Apply suggestions from code review Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com> --- tikv-configuration-file.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 612d60666e61a..74f82603a0c7d 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1175,15 +1175,15 @@ Configuration items related to `import` ### `wait-for-lock-timeout` - 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: 1s -- Minimum value: 1ms +- 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`. -- Default value: 20ms +- Default value: 20 ms ### `pipelined` -+ 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. +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. + Default value: false From f4377a567fc860840bb66d7914aa2da67eadd1de Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:39:51 +0800 Subject: [PATCH 3/5] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 74f82603a0c7d..b7b677fa50932 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1185,5 +1185,5 @@ Configuration items related to `import` ### `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. +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 causes the failure of pessimistic transaction commit. + Default value: false From 47409bc00ac397af2c06019036d71343168f2bee Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:43:12 +0800 Subject: [PATCH 4/5] Update tikv-configuration-file.md --- tikv-configuration-file.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index b7b677fa50932..728b725fcc579 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1186,4 +1186,5 @@ Configuration items related to `import` ### `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 causes the failure of pessimistic transaction commit. -+ Default value: false + +The default value of `pipelined` is `false`. From c0a297dfde55211d9cabe1a9a2b587b9e49dc100 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:57:49 +0800 Subject: [PATCH 5/5] Update tikv-configuration-file.md Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com> --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 728b725fcc579..f095d98827786 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1185,6 +1185,6 @@ Configuration items related to `import` ### `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 causes the failure of pessimistic transaction commit. +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`.