Repository navigation
docs: fix hybrid deployment and benchmark guide inconsistencies - #24509
ti-chi-bot[bot] merged 4 commits into
Conversation
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: pingcap/docs/.coderabbit.yaml
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
3b2e221f-00aa-4472-a734-e6b94699df29
📒 Files selected for processing: 3
benchmark/benchmark-tidb-using-sysbench.mdbenchmark/benchmark-tidb-using-tpcc.mdhybrid-deployment-topology.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| > **Note:** | ||
| > | ||
| > If you enable the optimistic transaction model (TiDB uses the pessimistic transaction mode by default), TiDB rolls back transactions when a concurrency conflict is found. Setting `tidb_disable_txn_auto_retry` to `off` turns on the automatic retry mechanism after meeting a transaction conflict, which can prevent Sysbench from quitting because of the transaction conflict error. | ||
| > If you switch TiDB to the optimistic transaction mode, starting from v8.0.0, TiDB no longer supports automatic retries of optimistic transactions. If transaction conflicts cause Sysbench to quit, use the default pessimistic transaction mode or retry transactions in your application. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Do not describe pessimistic mode as the default for every cluster.
Only newly created clusters default to pessimistic transaction mode. Upgraded clusters can retain their previous mode. Remove default to keep this instruction correct for upgraded clusters.
Apply this documentation change
- > If you switch TiDB to the optimistic transaction mode, starting from v8.0.0, TiDB no longer supports automatic retries of optimistic transactions. If transaction conflicts cause Sysbench to quit, use the default pessimistic transaction mode or retry transactions in your application.
+ > If you switch TiDB to the optimistic transaction mode, starting from v8.0.0, TiDB no longer supports automatic retries of optimistic transactions. If transaction conflicts cause Sysbench to quit, use pessimistic transaction mode or retry transactions in your application.As per path instructions, this Markdown fix uses an exact contiguous replacement.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > If you switch TiDB to the optimistic transaction mode, starting from v8.0.0, TiDB no longer supports automatic retries of optimistic transactions. If transaction conflicts cause Sysbench to quit, use the default pessimistic transaction mode or retry transactions in your application. | |
| > If you switch TiDB to the optimistic transaction mode, starting from v8.0.0, TiDB no longer supports automatic retries of optimistic transactions. If transaction conflicts cause Sysbench to quit, use pessimistic transaction mode or retry transactions in your application. |
Source: Path instructions
| - The label scheduling configuration | ||
|
|
||
| Since multiple instances of TiKV are deployed on a single machine, if the physical machines go down, the Raft Group might lose two of the default three replicas, which causes the cluster unavailability. To address this issue, you can use the label to enable the smart scheduling of PD, which ensures that the Raft Group has more than two replicas in multiple TiKV instances on the same machine. | ||
| Since multiple instances of TiKV are deployed on a single machine, if a physical machine goes down, the Raft Group might lose two of the default three replicas, which causes cluster unavailability. To address this issue, you can configure labels to enable PD to schedule replicas across different physical machines, which helps prevent multiple replicas of the same Raft Group from being placed on the same machine. |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Limit the failure scope to the affected Raft Group.
If one machine hosts two of three replicas, that Raft Group can become unavailable. This does not imply that the entire cluster becomes unavailable. TiDB documents this as Region or Raft Group unavailability. (docs.pingcap.com)
Since multiple instances of TiKV are deployed on a single machine, if a physical machine goes down, a Raft Group might lose two of the default three replicas, which can make that Raft Group unavailable. To address this issue, configure labels so that PD can schedule replicas across different physical machines, which helps prevent multiple replicas of the same Raft Group from being placed on the same machine.
As per path instructions, this documentation fix uses a GitHub committable suggestion.
Source: Path instructions
|
Auto-sync completed successfully Source PR: https://github.com/pingcap/docs-cn/pull/21221/files/fa8e58b8aaea3b4495200fd7f08fd6991391bde3..001dcc930480224335acd696faf8f31b978ee63f English documentation has been updated based on Chinese documentation changes. |
Synced from: https://github.com/pingcap/docs-cn/pull/21221/files/fa8e58b8aaea3b4495200fd7f08fd6991391bde3..001dcc930480224335acd696faf8f31b978ee63f Target PR: pingcap#24509 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: pingcap/docs/.coderabbit.yaml
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
f37bb691-a330-4849-bb7c-341756a82a2e
📒 Files selected for processing: 2
releases/release-8.5.5.mdticdc/ticdc-storage-consumer-dev-guide.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
|
|
||
| * Starting from v8.5.5, TiDB automatically sets target tables to `restore` mode during data restore. Tables in `restore` mode prohibit any user read or write operations. Once the restore completes, TiDB automatically switches the mode back to `normal` for these tables, allowing users to read and write the tables normally. This behavior ensures task stability and data consistency during the restore process. | ||
| * Starting from v8.5.5, when the `--load-stats` parameter is set to `false`, BR no longer writes statistics for restored tables into the `mysql.stats_meta` table. To update the relevant statistics, you can manually execute [`ANALYZE TABLE`](/sql-statements/sql-statement-analyze-table.md) after the restore. | ||
| * Starting from v8.5.5, after enabling table-level task splitting (`scheduler.enable-table-across-nodes = true`) in the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), the data file naming format of Storage Sink changes from `CDC{num}.{extension}` to `CDC_{uuid}_{num}.{extension}`, and the Index file naming format changes from `CDC.index` to `CDC_{uuid}.index`. For more information, see [Storage Sink file naming changes and consumption instructions](/ticdc/ticdc-architecture.md#storage-sink-文件名变更和消费说明). |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add the linked English Storage Sink section before publishing.
The target anchor is not present in the English ticdc-architecture.md, and this PR does not modify that file. Both new links therefore point to a missing section. Add the English section or replace both links with an existing target. (raw.githubusercontent.com)
|
|
||
| When processing files, a data file might be read by the downstream before it is fully written, causing this part of the data to fail to be read successfully. To avoid this situation, when writing a downstream consumer program, read data in the following order: | ||
|
|
||
| 1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub sync task. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Hyphenate the compound modifier.
Use sub-sync task instead of sub sync task.
Committable replacement
--- "a/ticdc/ticdc-storage-consumer-dev-guide.md"
+++ "b/ticdc/ticdc-storage-consumer-dev-guide.md"
@@ -179,7 +179,7 @@
When processing files, a data file might be read by the downstream before it is fully written, causing this part of the data to fail to be read successfully. To avoid this situation, when writing a downstream consumer program, read data in the following order:
-1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub sync task.
+1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub-sync task.
2. For the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), read the files whose file numbers are less than or equal to the number in the file name in sequence. For the [TiCDC old architecture](/ticdc/ticdc-classic-architecture.md), read the files whose file numbers are less than the number in the file name in sequence.
> **Note:**📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub sync task. | |
| 1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub-sync task. |
🧰 Tools
🪛 LanguageTool
[grammar] ~182-~182: Use a hyphen to join words.
Context: ...d}.index` file corresponding to each sub sync task. 2. For the [TiCDC New Archite...
(QB_NEW_EN_HYPHEN)
Sources: Path instructions, Linters/SAST tools
| When processing files, a data file might be read by the downstream before it is fully written, causing this part of the data to fail to be read successfully. To avoid this situation, when writing a downstream consumer program, read data in the following order: | ||
|
|
||
| 1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub sync task. | ||
| 2. For the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), read the files whose file numbers are less than or equal to the number in the file name in sequence. For the [TiCDC old architecture](/ticdc/ticdc-classic-architecture.md), read the files whose file numbers are less than the number in the file name in sequence. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Document the cross-subtask merge order.
The new instructions stop after reading files for each subtask. They omit the required step to sort DML events from all subtasks by commit-ts before downstream processing. Without this step, files with different UUIDs can be applied out of commit order. The source guidance includes this requirement. (github.com)
Committable replacement
--- "a/ticdc/ticdc-storage-consumer-dev-guide.md"
+++ "b/ticdc/ticdc-storage-consumer-dev-guide.md"
@@ -180,7 +180,8 @@
When processing files, a data file might be read by the downstream before it is fully written, causing this part of the data to fail to be read successfully. To avoid this situation, when writing a downstream consumer program, read data in the following order:
1. Read the Index files in the `{schema}/{table}/{table-version-separator}/` directory to obtain the file names recorded in each Index file. If table-level task splitting is not enabled, read `meta/CDC.index`; if table-level task splitting is enabled in the TiCDC new architecture (`scheduler.enable-table-across-nodes = true`), read the `meta/CDC_{uuid}.index` file corresponding to each sub sync task.
-2. For the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), read the files whose file numbers are less than or equal to the number in the file name in sequence. For the [TiCDC old architecture](/ticdc/ticdc-classic-architecture.md), read the files whose file numbers are less than the number in the file name in sequence.
+2. For the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), read the files whose file numbers are less than or equal to the sequence number in each file name recorded by the Index file. For the [TiCDC old architecture](/ticdc/ticdc-classic-architecture.md), read the files whose file numbers are less than the sequence number in each file name recorded by the Index file.
+3. After reading DML events from all subtasks, sort the events by `commit-ts` before processing them downstream.
> **Note:**
>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 2. For the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), read the files whose file numbers are less than or equal to the number in the file name in sequence. For the [TiCDC old architecture](/ticdc/ticdc-classic-architecture.md), read the files whose file numbers are less than the number in the file name in sequence. | |
| 2. For the [TiCDC New Architecture](/ticdc/ticdc-architecture.md), read the files whose file numbers are less than or equal to the sequence number in each file name recorded by the Index file. For the [TiCDC old architecture](/ticdc/ticdc-classic-architecture.md), read the files whose file numbers are less than the sequence number in each file name recorded by the Index file. | |
| 3. After reading DML events from all subtasks, sort the events by `commit-ts` before processing them downstream. |
Source: Path instructions
ed2026d to
2bccffc
Compare
|
LGTM about modifying tpcc thread |
|
@LykxSassinator: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@cfzjywxk: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@expxiaoli: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[LGTM Timeline notifier]Timeline:
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
In response to a cherrypick label: new pull request created to branch |
What is changed, added or deleted? (Required)
numa_nodeapplies both CPU and memory binding policies.tidb_disable_txn_auto_retry, and explain the supported behavior for optimistic transaction conflicts starting from v8.0.0.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?
Summary by CodeRabbit