Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions follower-read.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ To enable TiDB's Follower Read feature, modify the value of the `tidb_replica_re
set [session | global] tidb_replica_read = '<target value>';
```

<CustomContent platform="tidb-cloud" plan="essential,premium">

> **Note:**
>
> For [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential) and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium), `tidb_replica_read` is read-only and fixed to `leader`. Other read modes are not supported.

</CustomContent>
Comment on lines +49 to +55

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Scope the surrounding feature instructions by plan.

The new plan notes do not scope the related usage sections. Restricted TiDB Cloud plans can still see commands and recommendations that the notes state are unsupported.

  • follower-read.md#L49-L55: Include Starter in the restriction and gate Lines 63-90 so restricted plans are not told to use follower read modes.
  • pipelined-dml.md#L49-L55: Gate Lines 63-90 and Lines 120-128 so Essential and Premium are not told how to enable or configure "bulk" mode.

As per path instructions: use a regular review comment because the fix spans noncontiguous sections.

📍 Affects 2 files
  • follower-read.md#L49-L55 (this comment)
  • pipelined-dml.md#L49-L55

Source: Path instructions


Scope: SESSION | GLOBAL

Default: leader
Expand Down
8 changes: 8 additions & 0 deletions pipelined-dml.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ Currently, Pipelined DML has the following limitations:
- When [foreign key constraints](/foreign-key.md) are enabled (`foreign_key_checks = ON`), target tables must not include foreign key relationships.
- When executing `INSERT IGNORE ... ON DUPLICATE KEY UPDATE` statements, conflicting updates might result in `Duplicate entry` errors.

<CustomContent platform="tidb-cloud" plan="essential,premium">

> **Note:**
>
> For [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential) and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium), Pipelined DML is not supported, and you cannot enable Pipelined DML by setting [`tidb_dml_type`](/system-variables.md#tidb_dml_type-new-in-v800) to `"bulk"` or by using the [`SET_VAR`](/optimizer-hints.md#set_varvar_namevar_value) hint.

</CustomContent>

## Usage

This section describes how to enable Pipelined DML and verify whether it takes effect.
Expand Down
28 changes: 16 additions & 12 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1934,9 +1934,21 @@ Assume that you have a cluster with 4 TiDB nodes and multiple TiKV nodes. In thi
>
> The bulk DML execution mode (`tidb_dml_type = "bulk"`) is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues). In the current version, when TiDB performs large transactions using the bulk DML mode, it might affect the memory usage and execution efficiency of TiCDC, TiFlash, and the resolved-ts module of TiKV, and might cause OOM issues. Additionally, BR might be blocked and fail to process when encountering locks. Therefore, it is not recommended to use this mode when these components or features are enabled.

<CustomContent platform="tidb-cloud" plan="starter">

> **Note:**
>
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential).
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter).

</CustomContent>

<CustomContent platform="tidb-cloud" plan="essential,premium">

> **Note:**
>
> This variable is read-only for [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential) and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium). The value is fixed to `"standard"`, so you cannot enable Pipelined DML by setting this variable to `"bulk"`.

</CustomContent>
Comment on lines +1937 to +1951

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<CustomContent platform="tidb-cloud" plan="starter">
> **Note:**
>
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential).
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter).
</CustomContent>
<CustomContent platform="tidb-cloud" plan="essential,premium">
> **Note:**
>
> This variable is read-only for [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential) and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium). The value is fixed to `"standard"`, so you cannot enable Pipelined DML by setting this variable to `"bulk"`.
</CustomContent>
<CustomContent platform="tidb-cloud" plan="starter,essential,premium">
> **Note:**
>
For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium), this variable is read-only and fixed to `"standard"`, which means you cannot enable Pipelined DML by setting this variable to `"bulk"`.
</CustomContent>


- Scope: SESSION
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
Expand Down Expand Up @@ -5598,19 +5610,11 @@ SHOW WARNINGS;

### tidb_replica_read <span class="version-mark">New in v4.0</span>

<CustomContent platform="tidb-cloud" plan="starter,essential">

> **Note:**
>
> This variable is read-only for [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) and [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential).

</CustomContent>

<CustomContent platform="tidb-cloud" plan="premium">
<CustomContent platform="tidb-cloud" plan="starter,essential,premium">

> **Note:**
>
> This variable is read-only for [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium).
> For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium), this variable is read-only and fixed to `leader`, which means other read modes are not supported.

</CustomContent>

Expand Down Expand Up @@ -6625,7 +6629,7 @@ For details, see [Identify Slow Queries](/identify-slow-queries.md).
- Persists to cluster: Yes
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No
- Type: Enumeration
- Default value: `FAST`
- Default value: `STRICT` for [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential) and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium); `FAST` for other deployment options

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Resolve the conflicting default for tidb_txn_assertion_level.

Line 6632 states STRICT for Essential and Premium. Line 6640 still states that new clusters on v6.0.0 and later default to FAST. Update the version-specific statement to exclude Essential and Premium, or state the plan exception there.

As per path instructions: use a regular review comment when the correction is outside the changed range.

Source: Path instructions

- Possible values: `OFF`, `FAST`, `STRICT`
- This variable is used to control the assertion level. Assertion is a consistency check between data and indexes, which checks whether a key being written exists in the transaction commit process. For more information, see [Troubleshoot Inconsistency Between Data and Indexes](/troubleshoot-data-inconsistency-errors.md).

Expand Down
2 changes: 1 addition & 1 deletion tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode](
+ For scenarios with conflicts, after enabling this configuration, TiDB includes auto-commit transactions into the global lock-waiting management, which avoids deadlocks and mitigates the latency spike brought by deadlock-causing conflicts.
+ For scenarios with no conflicts, if there are many auto-commit transactions (the specific number is determined by the real scenarios. For example, the number of auto-commit transactions accounts for more than half of the total number of applications), and a single transaction operates a large data volume, enabling this configuration causes performance regression. For example, the auto-commit `INSERT INTO SELECT` statement.
+ When the session-level system variable [`tidb_dml_type`](/system-variables.md#tidb_dml_type-new-in-v800) is set to `"bulk"`, the effect of this configuration in the session is equivalent to setting it to `false`.
+ Default value: `false`
+ Default value: `false` for TiDB Self-Managed and [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter); `true` for [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential) and [{{{ .premium }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#premium)

### constraint-check-in-place-pessimistic <span class="version-mark">New in v6.4.0</span>

Expand Down