-
Notifications
You must be signed in to change notification settings - Fork 0
test: Update command-line-flags-for-tidb-configuration.md #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughUpdated three documentation pages: TiDB CLI flags retitled and reorganized (intro, defaults, renamed/added/removed flags, status/logging details); PD scheduling docs add three per-store lower-bound options and RU cost tweaks; TSO config swaps Changes
Sequence Diagram(s)sequenceDiagram
participant Admin
participant TiDB as TiDB Process
participant Config as Config File
participant Metrics as Prometheus/pprof
rect rgb(220,235,255)
Admin->>TiDB: start TiDB with CLI flags
TiDB->>Config: read config file (first)
Config-->>TiDB: return config values
TiDB->>TiDB: apply CLI flags (override config)
end
alt first startup with --initialize-sql
TiDB->>TiDB: execute SQL from `--initialize-sql`
end
TiDB->>Admin: bind to `--hosts` / `--file` (default 0.0.0.0)
TiDB->>Metrics: expose /metrics and /debug/pprof on `--status` (default 10080)
Metrics-->>Admin: metrics & pprof endpoints available
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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. Comment |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
command-line-flags-for-tidb-configuration.md (6)
120-139
: Add version notes for PROXY fallback flag--proxy-protocol-fallbackable was introduced around v6.5.1 (config counterpart). Add a brief version hint to reduce confusion on older clusters. (docs.pingcap.com)
## `--proxy-protocol-fallbackable` -+ 用于控制是否启用 PROXY 协议回退模式。如果设置为 `true`,TiDB 可以接受属于 `--proxy-protocol-networks` 的客户端使用非 PROXY 协议规范或者没有发送 PROXY 协议头的客户端连接。默认情况下,TiDB 仅接受属于 `--proxy-protocol-networks` 的客户端发送 PROXY 协议头的客户端连接。 ++ 用于控制是否启用 PROXY 协议回退模式(从 v6.5.1 起可用)。如果设置为 `true`,TiDB 可以接受属于 `--proxy-protocol-networks` 的客户端使用非 PROXY 协议规范或者没有发送 PROXY 协议头的客户端连接。默认情况下,TiDB 仅接受属于 `--proxy-protocol-networks` 的客户端发送 PROXY 协议头的客户端连接。 + 默认:`false`
140-153
: Clarify unit; keep deprecation noteConsider making the unit explicit in Default to avoid ambiguity and align with upstream phrasing. The deprecation warning since v6.3.0 is correct. (docs.pingcap.com)
-+ 默认:5 -+ 单位:秒 ++ 默认:5s(秒)
171-179
: Capitalize Prometheus consistentlyUse “Prometheus” with capital P in both the bullet and link text. (docs.pingcap.com)
-+ 该端口用于展示 TiDB 内部数据,包括 [prometheus 统计](https://prometheus.io/)和 [pprof](https://golang.org/pkg/net/http/pprof/) ++ 该端口用于展示 TiDB 内部数据,包括 [Prometheus 指标](https://prometheus.io/)和 [pprof](https://golang.org/pkg/net/http/pprof/)
191-195
: Unify list marker styleThis section uses “-” while most others use “+”. Pick one consistently to reduce diff noise in future edits.
-## `--temp-dir` - -- TiDB 用于存放临时文件的目录 -- 默认:"/tmp/tidb" +## `--temp-dir` + ++ TiDB 用于存放临时文件的目录 ++ 默认:"/tmp/tidb"
198-200
: Version anchor is good; optional inline hintYou already link to the variable with version info. Optionally echo “从 v7.4.0 开始引入” inline to help readers who won’t follow the link. (docs.pingcap.com)
-+ 用于设置当前 TiDB 实例 [`tidb_service_scope`](/system-variables.md#tidb_service_scope-从-v740-版本开始引入) 的初始值。 ++ 用于设置当前 TiDB 实例 [`tidb_service_scope`](/system-variables.md#tidb_service_scope-从-v740-版本开始引入) 的初始值(从 v7.4.0 起引入)。
112-119
: Minor example tweak: avoid spaces in PD address listAlthough spaces in the quoted example are accepted, removing them reduces copy/paste surprises in scripts.
-+ 对于 "TiKV" 存储引擎来说,path 指定的是实际的 PD 地址。假如在 192.168.100.113:2379、192.168.100.114:2379 和 192.168.100.115:2379 上面部署了 PD,那么 path 为 "192.168.100.113:2379, 192.168.100.114:2379, 192.168.100.115:2379" ++ 对于 "TiKV" 存储引擎来说,path 指定的是实际的 PD 地址。假如在 192.168.100.113:2379、192.168.100.114:2379 和 192.168.100.115:2379 上部署了 PD,那么 path 为 "192.168.100.113:2379,192.168.100.114:2379,192.168.100.115:2379"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
command-line-flags-for-tidb-configuration.md
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: pull
🔇 Additional comments (6)
command-line-flags-for-tidb-configuration.md (6)
9-10
: Defaults confirmation looks goodDefault ports 4000 (client) and 10080 (status) match the current docs. (docs.pingcap.com)
27-28
: Config precedence wording is accurate“命令行覆盖配置文件”与官方说明一致。 (docs.pingcap.com)
31-38
: Link to the right config file doc; keep phrasing consistentThe behavior of --config-check/--config-strict matches upstream. Ensure the link /tidb-configuration-file.md resolves in this repo’s structure. (docs.pingcap.com)
50-64
: Initialize flags are valid; summary above is inconsistentThese initialize flags are still documented in stable and recent versions; keeping them here is correct. The AI summary claiming they were removed is inaccurate. (docs.pingcap.com)
227-232
: Redaction section matches upstream; keep as-isThe --redact and collect-log behavior matches the latest stable docs. No change needed. (docs.pingcap.com)
2-5
: Front matter: tighten summary; confirm aliases
- Replace the verbose summary with the concise line below.
- Confirm the front-matter aliases map to the intended published paths (dev/stable/versioned). Repo check: system-variables.md and tidb-configuration-file.md exist and tidb_service_scope anchors are referenced in multiple files, but the /docs-cn/... alias redirects were not validated — verify or update/remove the aliases.
-summary: TiDB 配置参数包括启动参数和环境变量。启动参数包括 advertise-address、config、config-check、config-strict、cors 等。其中默认端口为 4000 和 10080。其他参数包括 log-file、metrics-addr、metrics-interval 等。注意配置文件的有效性和安全模式下的启动。 +summary: 介绍 TiDB 的命令行启动参数与默认端口(4000、10080),及常用选项(如 advertise-address、config、日志、代理与状态端口等),并说明配置文件与命令行的优先级与安全注意事项。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
command-line-flags-for-tidb-configuration.md (2)
55-64
:--initialize-insecure
/--initialize-secure
are not TiDB server flags.These appear to be introduced erroneously. Keeping them will cause users to pass unknown flags.
Apply:
-## `--initialize-insecure` - -- 在不安全模式下启动 tidb-server -- 默认:true - -## `--initialize-secure` - -- 在安全模式下启动 tidb-server -- 默认:false
65-69
: Scope correction:initialize-sql-file
is a config-file option, not a CLI flag.Present it as a config entry; avoid implying a
--initialize-sql-file
CLI flag exists.Apply:
-## `--initialize-sql-file` - -- 用于指定 TiDB 集群初次启动时执行的 SQL 脚本。参考[配置项 `initialize-sql-file`](/tidb-configuration-file.md#initialize-sql-file-从-v660-版本开始引入) -- 默认:"" +### 配置文件项:`initialize-sql-file` + +- 指定 TiDB 集群初次启动时执行的 SQL 脚本(仅配置文件支持,无等价 CLI 参数)。参考[配置项 `initialize-sql-file`](/tidb-configuration-file.md#initialize-sql-file-从-v660-版本开始引入)。
🧹 Nitpick comments (3)
command-line-flags-for-tidb-configuration.md (3)
124-129
: Clarify--path
default scope (varies by--store
).The default “/tmp/tidb” applies to
store=unistore
only; fortikv
,--path
must be PD endpoints and has no meaningful filesystem default.Apply:
-+ 默认:"/tmp/tidb" -+ 可以通过 `tidb-server --store=unistore --path=""` 来启动一个纯内存引擎的 TiDB ++ 默认(当 `--store=unistore` 时):"/tmp/tidb" ++ 当 `--store=tikv` 时,必须显式指定为 PD 地址列表(无本地路径默认值)。 ++ 可以通过 `tidb-server --store=unistore --path=""` 启动纯内存引擎。
176-183
: Update pprof reference link to the current Go documentation site.Minor docs freshness tweak.
Apply:
-+ 该端口用于展示 TiDB 内部数据,包括 [prometheus 统计](https://prometheus.io/)和 [pprof](https://golang.org/pkg/net/http/pprof/) ++ 该端口用于展示 TiDB 内部数据,包括 [Prometheus 统计](https://prometheus.io/)和 [pprof](https://pkg.go.dev/net/http/pprof)
4-4
: Summary mentions “安全模式下的启动” but related flags are invalid. Remove that hint.Avoid referencing non-existent secure/unsafe init modes.
Apply:
-summary: TiDB 配置参数包括启动参数和环境变量。启动参数包括 advertise-address、config、config-check、config-strict、cors 等。其中默认端口为 4000 和 10080。其他参数包括 log-file、metrics-addr、metrics-interval 等。注意配置文件的有效性和安全模式下的启动。 +summary: TiDB 配置参数包括启动参数和环境变量。启动参数包括 advertise-address、config、config-check、config-strict、cors 等。其中默认端口为 4000 和 10080。其他参数包括 log-file、metrics-addr、metrics-interval 等。请注意配置文件的有效性与参数优先级。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
command-line-flags-for-tidb-configuration.md
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: pull
🔇 Additional comments (4)
command-line-flags-for-tidb-configuration.md (4)
31-37
: Good:--config-check
/--config-strict
phrasing and cross-links.Accurate and helpful. No changes needed.
231-236
: Confirmcollect-log
subcommand usage under--redact
— confirmed. Verified: invocation is./tidb-server --redact=<true|false> collect-log <input> <output>
;--redact=true
masks fields wrapped in‹ ›
(replaced with?
),--redact=false
restores/removes the markers.
216-220
: Confirm--plugin-dir
defaultTiDB docs list tidb-server --plugin-dir default as "/data/deploy/plugin"; the SQL system variable plugin_dir defaults to an empty string.
191-194
: Default store is "unistore" — verified.
Official TiDB docs show tidb-server --store defaults to "unistore" for stable (including v7.x/v8.x); TiUP starting TiKV by default is a deployment-tool choice, not a change to this flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tso-configuration-file.md (1)
128-132
: Remove stray metrics interval from log.file section (metrics block was removed).“向 Prometheus 推送监控指标数据的间隔时间” 属于 metrics/metric 配置,而不是 log.file。当前 PR 摘要称 metrics 段已删除;保留该段会造成读者混淆。
-### `interval` - -- 向 Prometheus 推送监控指标数据的间隔时间。 -- 默认:15sIf metrics 配置仍应保留,请改为单独的 “## metrics” 小节并完整说明所有相关键;否则如上删除。
🧹 Nitpick comments (5)
tso-configuration-file.md (5)
45-50
: “Primary Key 租约”表述不当,易被理解为数据库主键。应为 “Primary(主节点)租约/选主租约”,与 TSO 主从角色一致。
- TSO Primary Key 租约超时时间,超时系统重新选举 Primary。 + TSO Primary(主节点)租约超时时间,超时后系统将重新选举 Primary。
118-127
: 统一“默认/默认值”表述风格。本文件多数使用“默认值:”,此处使用了“默认:”。建议统一。
- 如果未设置本参数或把本参数设置为默认值 `0`,TSO 节点不清理日志文件。 -- 默认:0 + 如果未设置本参数或把本参数设置为默认值 `0`,TSO 节点不清理日志文件。 + - 默认值:0 - 如果未设置本参数或把本参数设置为默认值 `0`,TSO 节点会保留所有的日志文件。 -- 默认:0 + 如果未设置本参数或把本参数设置为默认值 `0`,TSO 节点会保留所有的日志文件。 + - 默认值:0
29-31
: 措辞微调:更自然的中文表述。“监听的客户端 URL”略别扭,建议改为“客户端访问的监听地址(URL)”。
-- TSO 节点监听的客户端 URL。 +- TSO 节点客户端访问的监听地址(URL)。
40-44
: 措辞微调:不是“监听其他节点”。这里是“用于连接/发现其他 TSO 节点的 URL 列表”,而非“监听”。
-- TSO 节点监听其他 TSO 节点的 URL 列表。 +- 用于与其他 TSO 节点通信的 URL 列表。
63-71
: Confirmed cert-path/cacert-path semantics — apply wording tweak.Verified against PD/TiDB/TiKV docs: cert-path = node/service X.509 证书(PEM);key-path = 对应私钥(PEM);cacert-path = 用于验证对端证书链的 CA 根/中间证书(PEM)。
File: tso-configuration-file.md Lines: 63-71
-### `cert-path` -- 包含 X.509 证书的 PEM 文件路径 +### `cert-path` +- 节点/服务端证书(X.509)PEM 文件路径 -### `cacert-path` -- CA 文件路径 +### `cacert-path` +- CA 根证书(X.509)PEM 文件路径
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tso-configuration-file.md
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: pull
🔇 Additional comments (1)
tso-configuration-file.md (1)
27-31
: 确认:PD 默认 client-urls 为 http://127.0.0.1:2379,TSO 默认 listen-addr 为 http://127.0.0.1:3379;advertise- 默认与对应地址相同,Docker 示例 advertise 可为 http://192.168.100.113:2379/3379,Docker 下 listen 应设为 0.0.0.0。*结论:文档中使用的 2379(PD)和 3379(TSO)端口与官方文档一致,无需修改。
位置:tso-configuration-file.md 行 27-31、40-44
Synced from: qiancai/docs-cn#14 Target PR: #42 AI Provider: gemini Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
First-time contributors' checklist
What is changed, added or deleted? (Required)
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).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?
Summary by CodeRabbit