Skip to content

Fix deployment doc inconsistencies - #21979

Open
doc-claw-bot wants to merge 4 commits into
pingcap:masterfrom
doc-claw-bot:docs/fix-tiup-deployment-inconsistencies-zh
Open

doc-claw-bot wants to merge 4 commits into
pingcap:masterfrom
doc-claw-bot:docs/fix-tiup-deployment-inconsistencies-zh

Conversation

@doc-claw-bot

@doc-claw-bot doc-claw-bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What is changed, added or deleted? (Required)

Sync the Chinese TiDB deployment docs with the matching English fixes:

  • clarify the difference between disabling swap and lowering swap priority, and remove the command sequence that re-enabled swap immediately
  • replace the stale v6.1.0 NUMA deployment example with the version placeholder v{{{ .tidb-version }}}
  • correct the topology section count from six scenarios to five
  • document that clusters started with tiup cluster start --init require -p when logging in as root

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)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 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

  • 文档更新
    • 补充关闭 swap、处理 systemd swap 单元及在禁用后和重启后检查状态的步骤;保留 swap 时可设置 vm.swappiness=0,并说明这不会禁用 swap。
    • 将 NUMA 安装示例中的 TiDB 版本号改为模板变量。
    • 补充 Dashboard 和数据库登录说明,涵盖初始化生成的密码、空密码、修改后的密码及登录命令。
    • 更新常用部署场景列表,涵盖 OLTP、HTAP、TiCDC、单机多实例和跨机房部署。

@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 14, 2026
@doc-claw-bot doc-claw-bot added type/bugfix This PR fixes a bug. area/tiup Indicates that the Issue or PR belongs to the area of the TiUP tool. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. translation/from-docs This PR is translated from a PR in pingcap/docs. and removed missing-translation-status This PR does not have translation status info. labels Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

更新部署前的 swap 配置说明和 TiUP 部署示例,将常用部署场景数量改为五种。更新 Dashboard 与数据库的登录说明,涵盖初始化密码、空密码和修改后的密码。

Changes: TiDB 部署文档

Layer / File(s) Summary
部署前配置与场景说明
check-before-deployment.md, production-deployment-using-tiup.md
swap 说明按延迟需求和内存情况区分禁用与保留方案。禁用方案包括关闭 swap、调整 /etc/fstab,以及在适用主机上屏蔽 swap 单元并检查 /proc/swaps。保留方案说明 vm.swappiness=0 不会禁用 swap。TiUP 示例改用版本模板,常用部署场景数量改为五种。
安装后的登录说明
post-installation-check.md
更新 Dashboard 和数据库登录说明。使用 --init 时,密码使用 TiUP 输出的初始密码;未使用 --init 且 root 密码未设置时,数据库登录可省略 -p。说明密码修改后的登录方式,以及不带 --init 重启不会重置已有密码。

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

Change: Other

Suggested reviewers: qiancai

Merge Risk: Low · previous review b62c7

The deployment instructions may leave swap enabled or allow it to return after reboot on affected hosts.

Architecture risk: Low · up to 3f3b9

The change affects 3 systems.

Changed systems: check-before-deployment.md, post-installation-check.md, production-deployment-using-tiup.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — check-before-deployment.md (service) was modified; 1 changed file maps to changed impact.
  • observed — post-installation-check.md (service) was modified; 1 changed file maps to changed impact.
  • observed — production-deployment-using-tiup.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in check-before-deployment.md: swap 说明将永久关闭建议从设置 vm.swappiness = 0 并执行 swapoff -a && swapon -a 改为:已启用时运行 swapoff -a 立即关闭,并删除或注释 /etc/fstab 中的 swap 条目以在重启后保持关闭;开机时不单独划分 swap 分区的建议保留。
  • observed — Modified behavior in check-before-deployment.md: TiUP 部署示例将固定版本 v6.1.0 替换为 {{{ .tidb-version }}} 模板值。
  • observed — Modified behavior in post-installation-check.md: 新增安全启动集群后的登录分支:使用 --init 时,MySQL 命令追加 -p,连接时输入自动生成的密码。
  • observed — Modified behavior in production-deployment-using-tiup.md: 常用部署场景数量由 6 种改为 5 种;场景说明表仍列出五种场景。
Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed 标题“Fix deployment doc inconsistencies”与变更内容相关,准确概括了修复部署文档不一致问题这一主要目标。标题简洁且足够明确。
Description check Passed 描述包含变更内容、适用版本、相关 PR、AI 参与情况及变更类型检查项。内容与文件变更和 PR 目标一致。首次贡献者清单按模板说明可在非首次贡献时移除,因此不影响完整性。
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. (1 skipped: 1 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: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: pingcap/docs-cn/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 344e32ef-f39c-41d9-b95b-9550fae95477
📥 Commits

Reviewing files that changed from the base of the PR and between ade7687 and 3f3b9df.

📒 Files selected for processing: 3
  • check-before-deployment.md
  • post-installation-check.md
  • production-deployment-using-tiup.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.

Comment thread check-before-deployment.md Resolved
@qiancai qiancai changed the title Fix TiUP deployment doc inconsistencies Fix deployment doc inconsistencies Nov 2, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kissmydb for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 2, 2026
Comment thread check-before-deployment.md Resolved

@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.

Follow-up Comments

Outside diff 在执行 swapoff -a 前检查可用内存。

109-109: Minor · Stability & Availability · Quick win

在执行 swapoff -a 前检查可用内存。

当可用内存不足以换入已换出的数据时,swapoff -a 会因 ENOMEM 失败,swap 仍可能处于启用状态。请在命令前增加前置条件。详见 Linux swapoff(2)。

📝 建议修改
    1. 安装操作系统时,不创建 swap 分区或 swap 文件。如果已经启用 swap,请先确认系统可用内存能够容纳当前已换出的数据,再执行以下命令立即禁用:

Open the source location

Outside diff 使用 list-unit-files 列出所有 swap 单元文件。

120-120: Minor · Functional Correctness · Quick win

使用 list-unit-files 列出所有 swap 单元文件。

systemctl list-units 只列出 systemd 当前已加载的 unit。--all 只增加已加载但未激活的 unit,不会列出尚未加载的 unit。systemd-gpt-auto-generator 会根据 GPT 分区类型生成 swap unit,这些 unit 可能尚未加载,因此该命令可能不返回它们。后续步骤随后只会对输出中的 unit 执行 systemctl mask,未列出的 swap unit 不会被屏蔽,重启后仍可能被自动启用。

systemctl list-unit-files --type=swap 列出文件系统中安装的 unit 文件,其中包括生成的 unit 文件,适合该屏蔽步骤。

建议修改
-        systemctl list-units --type=swap --all
+        systemctl list-unit-files --type=swap

参考:systemctl 手册

Open the source location


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 487e4fb and b62c790.

Files selected for processing: 1
  • check-before-deployment.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tiup Indicates that the Issue or PR belongs to the area of the TiUP tool. contribution This PR is from a community contributor. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants