From abb9ba7e88b68c14437e8bd5ad230b3aea9623bf Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Sat, 14 Sep 2024 20:04:30 +0800 Subject: [PATCH 01/17] add in memory pessismitic lock size limit config Signed-off-by: cfzjywxk --- tikv-configuration-file.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index d1bd938820a5c..3000aa01d3814 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -2307,6 +2307,18 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode]( + Default value: `true` + Note that `in-memory` takes effect only when the value of `pipelined` is `true`. +### `in-memory-peer-size-limit` New in v8.4.0 + ++ Control the memory size limit of pessimistic locks for one region. The pessimistic locks would be written persistently if the memory size exceeds the limit. ++ Default value: `512KiB` ++ Unit: KiB|MiB|GiB + +### `in-memory` New in v8.4.0 + ++ Control the memory size limit of pessimistic locks for one TiKV instance. The pessimistic locks would be written persistently if the memory size exceeds the limit. ++ Default value: `100MiB` ++ Unit: KiB|MiB|GiB + ## quota Configuration items related to Quota Limiter. From 426a49802bdb63c4ed43dc1f61e38357f39a34f9 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Sat, 14 Sep 2024 20:05:53 +0800 Subject: [PATCH 02/17] comment Signed-off-by: cfzjywxk --- tikv-configuration-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 3000aa01d3814..193bd57b02174 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -2309,13 +2309,13 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode]( ### `in-memory-peer-size-limit` New in v8.4.0 -+ Control the memory size limit of pessimistic locks for one region. The pessimistic locks would be written persistently if the memory size exceeds the limit. ++ Control the memory size limit of pessimistic locks for one region. The pessimistic locks would be written persistently if the memory usage exceeds the limit. + Default value: `512KiB` + Unit: KiB|MiB|GiB ### `in-memory` New in v8.4.0 -+ Control the memory size limit of pessimistic locks for one TiKV instance. The pessimistic locks would be written persistently if the memory size exceeds the limit. ++ Control the memory size limit of pessimistic locks for one TiKV instance. The pessimistic locks would be written persistently if the memory usage exceeds the limit. + Default value: `100MiB` + Unit: KiB|MiB|GiB From 676dcc2a915ac01f08b7f3053bb31bbde335605e Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Wed, 18 Sep 2024 19:43:47 +0800 Subject: [PATCH 03/17] rename Signed-off-by: cfzjywxk --- 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 193bd57b02174..50203ffaa2eae 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -2313,7 +2313,7 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode]( + Default value: `512KiB` + Unit: KiB|MiB|GiB -### `in-memory` New in v8.4.0 +### `in-memory-instance-size-limit` New in v8.4.0 + Control the memory size limit of pessimistic locks for one TiKV instance. The pessimistic locks would be written persistently if the memory usage exceeds the limit. + Default value: `100MiB` From cfc01a2f7533c195f94a178ade00eee8d8e73ecd Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Thu, 19 Sep 2024 15:27:45 +0800 Subject: [PATCH 04/17] add dynamic conf Signed-off-by: cfzjywxk --- dynamic-config.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dynamic-config.md b/dynamic-config.md index 5f5299a44e116..416ef0637e6da 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -179,6 +179,8 @@ The following TiKV configuration items can be modified dynamically: | `pessimistic-txn.wake-up-delay-duration` | The duration after which a pessimistic transaction is woken up | | `pessimistic-txn.pipelined` | Determines whether to enable the pipelined pessimistic locking process | | `pessimistic-txn.in-memory` | Determines whether to enable the in-memory pessimistic lock | +| `pessimistic-txn.in-memory-peer-size-limit` | Control the memory size limit of pessimistic locks for one region | +| `pessimistic-txn.in-memory-instance-size-limit` | Control the memory size limit of pessimistic locks for one TiKV instance | | `quota.foreground-cpu-time` | The soft limit on the CPU resources used by TiKV foreground to process read and write requests | | `quota.foreground-write-bandwidth` | The soft limit on the bandwidth with which foreground transactions write data | | `quota.foreground-read-bandwidth` | The soft limit on the bandwidth with which foreground transactions and the Coprocessor read data | From ecf391f2fd3f5f855a1aebf770e69aaac4edb430 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Tue, 24 Sep 2024 11:41:00 +0800 Subject: [PATCH 05/17] Update tikv-configuration-file.md Co-authored-by: Aolin --- 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 50203ffaa2eae..806909a7cc6fc 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -2309,7 +2309,7 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode]( ### `in-memory-peer-size-limit` New in v8.4.0 -+ Control the memory size limit of pessimistic locks for one region. The pessimistic locks would be written persistently if the memory usage exceeds the limit. ++ Controls the memory usage limit for [in-memory pessimistic locks](/pessimistic-transaction.md#in-memory-pessimistic-lock) in a Region. When this limit is exceeded, TiKV writes pessimistic locks persistently. + Default value: `512KiB` + Unit: KiB|MiB|GiB From c6fdbd06e633b1fd4c43e0069ee3c431ea06f097 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Tue, 24 Sep 2024 11:41:06 +0800 Subject: [PATCH 06/17] Update tikv-configuration-file.md Co-authored-by: Aolin --- 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 806909a7cc6fc..ee5192ee1b139 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -2315,7 +2315,7 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode]( ### `in-memory-instance-size-limit` New in v8.4.0 -+ Control the memory size limit of pessimistic locks for one TiKV instance. The pessimistic locks would be written persistently if the memory usage exceeds the limit. ++ Controls the memory usage limit for [in-memory pessimistic locks](/pessimistic-transaction.md#in-memory-pessimistic-lock) in a TiKV instance. When this limit is exceeded, TiKV writes pessimistic locks persistently. + Default value: `100MiB` + Unit: KiB|MiB|GiB From b16cb429cd38ef363cfd23c1affbea1ab0860099 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Tue, 24 Sep 2024 11:41:12 +0800 Subject: [PATCH 07/17] Update dynamic-config.md Co-authored-by: Aolin --- dynamic-config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamic-config.md b/dynamic-config.md index 416ef0637e6da..dbf9ae5900ed7 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -179,8 +179,8 @@ The following TiKV configuration items can be modified dynamically: | `pessimistic-txn.wake-up-delay-duration` | The duration after which a pessimistic transaction is woken up | | `pessimistic-txn.pipelined` | Determines whether to enable the pipelined pessimistic locking process | | `pessimistic-txn.in-memory` | Determines whether to enable the in-memory pessimistic lock | -| `pessimistic-txn.in-memory-peer-size-limit` | Control the memory size limit of pessimistic locks for one region | -| `pessimistic-txn.in-memory-instance-size-limit` | Control the memory size limit of pessimistic locks for one TiKV instance | +| `pessimistic-txn.in-memory-peer-size-limit` | Controls the memory usage limit for in-memory pessimistic locks in a Region | +| `pessimistic-txn.in-memory-instance-size-limit` | Controls the memory usage limit for in-memory pessimistic locks in a TiKV instance | | `quota.foreground-cpu-time` | The soft limit on the CPU resources used by TiKV foreground to process read and write requests | | `quota.foreground-write-bandwidth` | The soft limit on the bandwidth with which foreground transactions write data | | `quota.foreground-read-bandwidth` | The soft limit on the bandwidth with which foreground transactions and the Coprocessor read data | From 905f51e798f5cd708b5e0500fbbb540cebd7fcc7 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Sun, 29 Sep 2024 11:37:36 +0800 Subject: [PATCH 08/17] add descriptions in transaction doc Signed-off-by: cfzjywxk --- pessimistic-transaction.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index b2bfc808f7f7c..c05d3148a9efb 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -200,7 +200,7 @@ If the application logic relies on the locking or lock waiting mechanisms, or if In v6.0.0, TiKV introduces the feature of in-memory pessimistic lock. When this feature is enabled, pessimistic locks are usually stored in the memory of the Region leader only, and are not persisted to disk or replicated through Raft to other replicas. This feature can greatly reduce the overhead of acquiring pessimistic locks and improve the throughput of pessimistic transactions. -When the memory usage of in-memory pessimistic locks exceeds the memory threshold of the Region or the TiKV node, the acquisition of pessimistic locks turns to the [pipelined locking process](#pipelined-locking-process). When the Region is merged or the leader is transferred, to avoid the loss of the pessimistic lock, TiKV writes the in-memory pessimistic lock to disk and replicates it to other replicas. +When the memory usage of in-memory pessimistic locks exceeds the memory threshold of the [Region](/tikv-configuration-file.md#in-memory-peer-size-limit-span-classversion-marknew-in-v840span) or the [TiKV](/tikv-configuration-file.md#in-memory-instance-size-limit-span-classversion-marknew-in-v840span) node, the acquisition of pessimistic locks turns to the [pipelined locking process](#pipelined-locking-process). When the Region is merged or the leader is transferred, to avoid the loss of the pessimistic lock, TiKV writes the in-memory pessimistic lock to disk and replicates it to other replicas. The in-memory pessimistic lock performs similarly to the pipelined locking process, which does not affect the lock acquisition when the cluster is healthy. However, when network isolation occurs in TiKV or a TiKV node is down, the acquired pessimistic lock might be lost. @@ -220,3 +220,21 @@ To dynamically disable this feature, modify the TiKV configuration dynamically: ```sql set config tikv pessimistic-txn.in-memory='false'; ``` + +Since v8.4.0, the region memory size limit and instance size limit of in-memory pessimistic locks could be configured +by the configuration file of TiKV: + +```toml +[pessimistic-txn] +in-memory-peer-size-limit = "512KiB" +in-memory-instance-size-limit = "100MiB" +``` + +These configurations could also be changed dynamically by: + +{{< copyable "sql" >}} + +```sql +set config tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; +set config tikv `pessimistic-txn.in-memory-instance-size-limit`="100MiB"; +``` From 30f0b52bbd8f4408d4b03b2c9770c214a0fd5072 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Sun, 29 Sep 2024 11:53:34 +0800 Subject: [PATCH 09/17] fix lint Signed-off-by: cfzjywxk --- pessimistic-transaction.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index c05d3148a9efb..d05f271be0977 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -221,8 +221,7 @@ To dynamically disable this feature, modify the TiKV configuration dynamically: set config tikv pessimistic-txn.in-memory='false'; ``` -Since v8.4.0, the region memory size limit and instance size limit of in-memory pessimistic locks could be configured -by the configuration file of TiKV: +Since v8.4.0, the region memory size limit and instance size limit of in-memory pessimistic locks could be configured by the configuration file of TiKV: ```toml [pessimistic-txn] From 565f29a82f4e416541b22493161257434e87b1c4 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:18:41 +0800 Subject: [PATCH 10/17] fix format and add links for TiKV configuration items Signed-off-by: Aolin --- pessimistic-transaction.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index d05f271be0977..2e4e2ed4fd664 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -200,7 +200,7 @@ If the application logic relies on the locking or lock waiting mechanisms, or if In v6.0.0, TiKV introduces the feature of in-memory pessimistic lock. When this feature is enabled, pessimistic locks are usually stored in the memory of the Region leader only, and are not persisted to disk or replicated through Raft to other replicas. This feature can greatly reduce the overhead of acquiring pessimistic locks and improve the throughput of pessimistic transactions. -When the memory usage of in-memory pessimistic locks exceeds the memory threshold of the [Region](/tikv-configuration-file.md#in-memory-peer-size-limit-span-classversion-marknew-in-v840span) or the [TiKV](/tikv-configuration-file.md#in-memory-instance-size-limit-span-classversion-marknew-in-v840span) node, the acquisition of pessimistic locks turns to the [pipelined locking process](#pipelined-locking-process). When the Region is merged or the leader is transferred, to avoid the loss of the pessimistic lock, TiKV writes the in-memory pessimistic lock to disk and replicates it to other replicas. +When the memory usage of in-memory pessimistic locks exceeds the memory threshold of the [Region](/tikv-configuration-file.md#in-memory-peer-size-limit-new-in-v840) or the [TiKV node](/tikv-configuration-file.md#in-memory-instance-size-limit-new-in-v840), the acquisition of pessimistic locks turns to the [pipelined locking process](#pipelined-locking-process). When the Region is merged or the leader is transferred, to avoid the loss of the pessimistic lock, TiKV writes the in-memory pessimistic lock to disk and replicates it to other replicas. The in-memory pessimistic lock performs similarly to the pipelined locking process, which does not affect the lock acquisition when the cluster is healthy. However, when network isolation occurs in TiKV or a TiKV node is down, the acquired pessimistic lock might be lost. @@ -221,7 +221,7 @@ To dynamically disable this feature, modify the TiKV configuration dynamically: set config tikv pessimistic-txn.in-memory='false'; ``` -Since v8.4.0, the region memory size limit and instance size limit of in-memory pessimistic locks could be configured by the configuration file of TiKV: +Starting from v8.4.0, you can configure the memory usage limit for in-memory pessimistic locks in a Region or a TiKV instance using [`pessimistic-txn.in-memory-peer-size-limit`](/tikv-configuration-file.md#in-memory-peer-size-limit-new-in-v840) or [`pessimistic-txn.in-memory-instance-size-limit`](/tikv-configuration-file.md#in-memory-instance-size-limit-new-in-v840): ```toml [pessimistic-txn] @@ -229,11 +229,9 @@ in-memory-peer-size-limit = "512KiB" in-memory-instance-size-limit = "100MiB" ``` -These configurations could also be changed dynamically by: - -{{< copyable "sql" >}} +To dynamically modify these limits, modify the TiKV configuration dynamically: ```sql -set config tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; -set config tikv `pessimistic-txn.in-memory-instance-size-limit`="100MiB"; +SET CONFIG tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; +SET CONFIG tikv `pessimistic-txn.in-memory-instance-size-limit`="100MiB"; ``` From 6d448975830a9ceee183c6b444f3d9a40183b5c4 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Wed, 16 Oct 2024 16:06:51 +0800 Subject: [PATCH 11/17] Update pessimistic-transaction.md Co-authored-by: Grace Cai --- pessimistic-transaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index 2e4e2ed4fd664..5d0b6dc81bd48 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -229,7 +229,7 @@ in-memory-peer-size-limit = "512KiB" in-memory-instance-size-limit = "100MiB" ``` -To dynamically modify these limits, modify the TiKV configuration dynamically: +To dynamically modify these limits, [modify TiKV configuration dynamically](/dynamic-config.md#modify-tikv-configuration-dynamically) as follows: ```sql SET CONFIG tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; From 16c492dbb0ed5262f56114b98a35567ad14bd29d Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Wed, 16 Oct 2024 16:06:56 +0800 Subject: [PATCH 12/17] Update pessimistic-transaction.md Co-authored-by: Grace Cai --- pessimistic-transaction.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index 5d0b6dc81bd48..01e89b1a065b8 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -220,6 +220,7 @@ To dynamically disable this feature, modify the TiKV configuration dynamically: ```sql set config tikv pessimistic-txn.in-memory='false'; ``` + Starting from v8.4.0, you can configure the memory usage limit for in-memory pessimistic locks in a Region or a TiKV instance using [`pessimistic-txn.in-memory-peer-size-limit`](/tikv-configuration-file.md#in-memory-peer-size-limit-new-in-v840) or [`pessimistic-txn.in-memory-instance-size-limit`](/tikv-configuration-file.md#in-memory-instance-size-limit-new-in-v840): From 23c277c3fc72e5af1c2adc60a0490d07392d3cd9 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Wed, 16 Oct 2024 16:07:02 +0800 Subject: [PATCH 13/17] Update pessimistic-transaction.md Co-authored-by: Grace Cai --- pessimistic-transaction.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index 01e89b1a065b8..1c2957ba27734 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -236,3 +236,5 @@ To dynamically modify these limits, [modify TiKV configuration dynamically](/dyn SET CONFIG tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; SET CONFIG tikv `pessimistic-txn.in-memory-instance-size-limit`="100MiB"; ``` + + From 33a2535afe066cda9fec3d4de5d3f8c2918b3148 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 16 Oct 2024 17:17:29 +0800 Subject: [PATCH 14/17] Apply suggestions from code review --- pessimistic-transaction.md | 1 - 1 file changed, 1 deletion(-) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index 1c2957ba27734..df2727b6db178 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -237,4 +237,3 @@ SET CONFIG tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; SET CONFIG tikv `pessimistic-txn.in-memory-instance-size-limit`="100MiB"; ``` - From f7296ce89f84aea6b5151eb36d7f37e99dbec6f9 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 16 Oct 2024 17:17:43 +0800 Subject: [PATCH 15/17] Apply suggestions from code review --- pessimistic-transaction.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index df2727b6db178..72ced7f89f064 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -220,6 +220,7 @@ To dynamically disable this feature, modify the TiKV configuration dynamically: ```sql set config tikv pessimistic-txn.in-memory='false'; ``` + Starting from v8.4.0, you can configure the memory usage limit for in-memory pessimistic locks in a Region or a TiKV instance using [`pessimistic-txn.in-memory-peer-size-limit`](/tikv-configuration-file.md#in-memory-peer-size-limit-new-in-v840) or [`pessimistic-txn.in-memory-instance-size-limit`](/tikv-configuration-file.md#in-memory-instance-size-limit-new-in-v840): From b9b3ce042010a6b4aee75323071465a3b47eff5b Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 16 Oct 2024 17:23:07 +0800 Subject: [PATCH 16/17] fix tidb-cloud ci --- pessimistic-transaction.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index 72ced7f89f064..9c2b2d7e4cdc5 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -200,8 +200,19 @@ If the application logic relies on the locking or lock waiting mechanisms, or if In v6.0.0, TiKV introduces the feature of in-memory pessimistic lock. When this feature is enabled, pessimistic locks are usually stored in the memory of the Region leader only, and are not persisted to disk or replicated through Raft to other replicas. This feature can greatly reduce the overhead of acquiring pessimistic locks and improve the throughput of pessimistic transactions. + + When the memory usage of in-memory pessimistic locks exceeds the memory threshold of the [Region](/tikv-configuration-file.md#in-memory-peer-size-limit-new-in-v840) or the [TiKV node](/tikv-configuration-file.md#in-memory-instance-size-limit-new-in-v840), the acquisition of pessimistic locks turns to the [pipelined locking process](#pipelined-locking-process). When the Region is merged or the leader is transferred, to avoid the loss of the pessimistic lock, TiKV writes the in-memory pessimistic lock to disk and replicates it to other replicas. + + + + +When the memory usage of in-memory pessimistic locks exceeds the memory threshold of the [Region](https://docs.pingcap.com/tidb/dev/tikv-configuration-file#in-memory-peer-size-limit-new-in-v840) or the [TiKV node](https://docs.pingcap.com/tidb/dev/tikv-configuration-file#in-memory-instance-size-limit-new-in-v840), the acquisition of pessimistic locks turns to the [pipelined locking process](#pipelined-locking-process). When the Region is merged or the leader is transferred, to avoid the loss of the pessimistic lock, TiKV writes the in-memory pessimistic lock to disk and replicates it to other replicas. + + + + The in-memory pessimistic lock performs similarly to the pipelined locking process, which does not affect the lock acquisition when the cluster is healthy. However, when network isolation occurs in TiKV or a TiKV node is down, the acquired pessimistic lock might be lost. If the application logic relies on the lock acquiring or lock waiting mechanism, or if you want to guarantee as much as possible the success rate of transaction commits even when the cluster is in an abnormal state, you need to **disable** the in-memory pessimistic lock feature. From c36943ccf1164fbf60140306a6826e2e971191b2 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 16 Oct 2024 17:43:03 +0800 Subject: [PATCH 17/17] make ci happy --- pessimistic-transaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pessimistic-transaction.md b/pessimistic-transaction.md index 9c2b2d7e4cdc5..ef875869e92a7 100644 --- a/pessimistic-transaction.md +++ b/pessimistic-transaction.md @@ -212,7 +212,6 @@ When the memory usage of in-memory pessimistic locks exceeds the memory threshol - The in-memory pessimistic lock performs similarly to the pipelined locking process, which does not affect the lock acquisition when the cluster is healthy. However, when network isolation occurs in TiKV or a TiKV node is down, the acquired pessimistic lock might be lost. If the application logic relies on the lock acquiring or lock waiting mechanism, or if you want to guarantee as much as possible the success rate of transaction commits even when the cluster is in an abnormal state, you need to **disable** the in-memory pessimistic lock feature. @@ -248,4 +247,5 @@ To dynamically modify these limits, [modify TiKV configuration dynamically](/dyn SET CONFIG tikv `pessimistic-txn.in-memory-peer-size-limit`="512KiB"; SET CONFIG tikv `pessimistic-txn.in-memory-instance-size-limit`="100MiB"; ``` +