Skip to content

docs: fix hybrid deployment and benchmark guide inconsistencies (#22034) - #22035

Merged
ti-chi-bot[bot] merged 4 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-22034-to-release-8.5
Nov 4, 2026
Merged

ti-chi-bot[bot] merged 4 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-22034-to-release-8.5

Conversation

@ti-chi-bot

@ti-chi-bot ti-chi-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #22034

What is changed, added or deleted? (Required)

  • Sync the Chinese docs with docs: fix hybrid deployment and benchmark guide inconsistencies docs#24509 for the hybrid deployment and benchmark guide fixes.
  • Clarify the host-level label guidance for hybrid deployments and explain that numa_node controls CPU and memory binding policies.
  • Remove the outdated Sysbench guidance about tidb_disable_txn_auto_retry and update the supported behavior for optimistic transaction conflicts from v8.0.0.
  • Align the TPC-C validation and cleanup commands with the 1000-warehouse example.

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 (in Chinese).

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)

What is the related PR or file link(s)?

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • 文档
    • 更新 Sysbench 数据导入说明:TiDB v8.0.0 起不再支持显式乐观事务自动重试;发生事务冲突时,可改用悲观事务模式,或在客户端实现重试。
    • 将 TPC-C 测试数据正确性验证及清理命令中的仓库数调整为 1000。
    • 补充部署拓扑说明:配置 host 级别标签可帮助将副本分散到不同物理机;说明 numa_node 的节点 ID 设置方式,以及 TiUP 对 CPU 和内存的绑定行为。

@ti-chi-bot ti-chi-bot added contribution This PR is from a community contributor. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Nov 4, 2026
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

本 PR 更新 Sysbench 与 TPC-C 基准测试文档,并调整混合部署文档中的副本调度和 NUMA 配置说明。

Changes: 基准测试文档

Layer / File(s) Summary
Sysbench 事务重试说明
benchmark/benchmark-tidb-using-sysbench.md
删除设置 tidb_disable_txn_auto_retry=off 的步骤。文档说明 v8.0.0 起不再支持显式乐观事务自动重试,并列出冲突时改用悲观事务模式或由客户端应用实现重试的方式。
TPC-C 数据校验与清理
benchmark/benchmark-tidb-using-tpcc.md
将数据校验和清理命令的 --warehouses 参数设为 1000,并新增测试完成后的数据校验命令。

混合部署拓扑文档

Layer / File(s) Summary
副本调度与 NUMA 配置
hybrid-deployment-topology.md
说明 host 级别 label 可使 PD 将副本分散到不同物理机。将 numa_node 说明改为填写 NUMA 节点 ID,并说明 TiUP 会通过 numactl 绑定实例的 CPU 和内存。

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • pingcap/docs-cn#22034:该 PR 修改了相同的文档内容;本 PR 是其在 release-8.5 分支上的自动 cherry-pick。

Suggested labels: translation/from-docs, type/cherry-pick-for-release-8.5, size/S

Suggested reviewers: qiancai

Merge Risk: Low · up to 4c8a7

The PR is mergeable with minor documentation fixes, but the current wording can overstate host-level isolation and make NUMA configuration less clear.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed 标题明确说明了文档修复范围,涵盖混合部署和基准测试指南,与变更内容一致。
Description check Passed 描述包含变更内容、适用版本、相关 PR 或文件链接、AI 参与情况及变更类型勾选项。内容与文件变更一致,满足模板的主要要求。
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between c6b3864 and 4c8a7c4.

Files selected for processing: 3
  • benchmark/benchmark-tidb-using-sysbench.md
  • benchmark/benchmark-tidb-using-tpcc.md
  • hybrid-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.

- label 调度配置

由于采用单机多实例部署 TiKV,为了避免物理机宕机导致 Region Group 默认 3 副本的 2 副本丢失,导致集群不可用的问题,可以通过 label 来实现 PD 智能调度,保证同台机器的多 TiKV 实例不会出现 Region Group 只有 2 副本的情况。
当多个 TiKV 实例部署在同一台物理机上时,机器故障可能会导致某个 Raft Group 丢失其默认 3 个副本中的 2 个副本,从而导致该 Raft Group 不可用。配置 host 级别的 label 后,PD 可以将副本分散到不同的物理机上,以降低这种风险。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

git diff --no-ext-diff c6b3864a5d321dcd4dd81b64649e900c56fb4699 4c8a7c4b0d8a00c5949b584a8d290fb662a40f84 -- hybrid-deployment-topology.md
sed -n '300,365p' hybrid-deployment-topology.md
rg -n 'server\.labels|replication\.location-labels|host.*label|numa_node' --glob '*.md' .

Repository: pingcap/docs-cn

Length of output: 18793


补充物理机数量不足时的隔离限制。

当前句子没有说明物理机数量不足时的限制。该限制会影响用户对隔离效果的判断。

建议替换
--- "a/hybrid-deployment-topology.md"
+++ "b/hybrid-deployment-topology.md"
@@ -322,7 +322,7 @@
 
 - label 调度配置
 
-    当多个 TiKV 实例部署在同一台物理机上时,机器故障可能会导致某个 Raft Group 丢失其默认 3 个副本中的 2 个副本,从而导致该 Raft Group 不可用。配置 host 级别的 label 后,PD 可以将副本分散到不同的物理机上,以降低这种风险。
+    当多个 TiKV 实例部署在同一台物理机上时,机器故障可能会导致某个 Raft Group 丢失其默认 3 个副本中的 2 个副本,从而导致该 Raft Group 不可用。配置 host 级别的 label 后,PD 可以将副本分散到不同的物理机上,以降低这种风险。如果可用物理机数量不足,PD 无法保证物理机级别的隔离。
 
     - TiKV 配置
 
Committable suggestion

IMPORTANT
Review the replacement and indentation, then test before committing.

Suggested change
当多个 TiKV 实例部署在同一台物理机上时,机器故障可能会导致某个 Raft Group 丢失其默认 3 个副本中的 2 个副本,从而导致该 Raft Group 不可用。配置 host 级别的 label 后,PD 可以将副本分散到不同的物理机上,以降低这种风险。
当多个 TiKV 实例部署在同一台物理机上时,机器故障可能会导致某个 Raft Group 丢失其默认 3 个副本中的 2 个副本,从而导致该 Raft Group 不可用。配置 host 级别的 label 后,PD 可以将副本分散到不同的物理机上,以降低这种风险。如果可用物理机数量不足,PD 无法保证物理机级别的隔离。

- 在实例参数模块配置对应的 `numa_node` 参数,并添加对应的物理 CPU 的核数;

- 在实例配置中,将 `numa_node` 设置为 NUMA 节点 ID,例如 `"0"` 或 `"0,1"`。
- numa 绑核使用前,确认已经安装 numactl 工具,以及物理机对应的物理机 CPU 的信息后,再进行参数配置;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Maintainability & Code Quality · Quick win

修正 numa_node 配置前置条件的表述。

当前句子重复使用“物理机”,且 numactl 未使用代码格式。请明确需要确认的 NUMA 节点与 CPU 对应关系。

依据文档写作指南,参数说明应清晰、简短,并使用统一格式。按 Markdown 文档路径要求,以下提供可直接替换的文本。

建议替换
--- "a/hybrid-deployment-topology.md"
+++ "b/hybrid-deployment-topology.md"
@@ -346,7 +346,7 @@
 - `numa_node` 绑核
 
     - 在实例配置中,将 `numa_node` 设置为 NUMA 节点 ID,例如 `"0"` 或 `"0,1"`。
-    - numa 绑核使用前,确认已经安装 numactl 工具,以及物理机对应的物理机 CPU 的信息后,再进行参数配置;
+    - 配置 `numa_node` 前,请确认目标物理机已安装 `numactl`,并确认该物理机的 NUMA 节点与 CPU 对应关系;
 
     - 配置 `numa_node` 后,TiUP 会通过 `numactl` 将该实例的 CPU 和内存绑定到指定的 NUMA 节点。
 
Committable suggestion

IMPORTANT
Review the replacement and indentation, then test before committing.

Suggested change
- numa 绑核使用前,确认已经安装 numactl 工具,以及物理机对应的物理机 CPU 的信息后,再进行参数配置;
- 配置 `numa_node` 前,请确认目标物理机已安装 `numactl`,并确认该物理机的 NUMA 节点与 CPU 对应关系;

Sources: Coding guidelines, Path instructions

@qiancai

qiancai commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

/approve

@ti-chi-bot

ti-chi-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Nov 4, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 7ccf2c5 into pingcap:release-8.5 Nov 4, 2026
11 checks passed
@ti-chi-bot
ti-chi-bot Bot deleted the cherry-pick-22034-to-release-8.5 branch November 4, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants