Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the documentation by extracting common installation and startup instructions into shared MDX components. The review feedback identifies several critical issues: incorrect file paths and typos in import statements, missing component imports within the new MDX files, and redundant imports left in the refactored files. Additionally, a content mismatch was discovered where the Enterprise edition guide now incorrectly displays OSS installation instructions due to the shared component usage.
There was a problem hiding this comment.
Pull request overview
Refactors the Chinese TSDB documentation by extracting “installation” and “start” tab content into reusable MDX partials and importing them into existing docs pages.
Changes:
- Added shared MDX tab components for installation instructions and service startup instructions.
- Replaced large inline
<Tabs>blocks in03-install.mdand03-package.mdxwith<InstallationTabs />and<StartTabs />.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| docs/zh/_start_tabs.mdx | New shared “start services” tabs snippet (Linux/Windows/macOS). |
| docs/zh/_installation_tabs.mdx | New shared “installation” tabs snippet (Linux tar/deb/rpm/apt, macOS, Windows). |
| docs/zh/08-operation/03-install.md | Replaces inline install/start tabs with imports of shared snippets. |
| docs/zh/04-get-started/03-package.mdx | Replaces inline install/start instructions with shared snippets and keeps the get-started content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </Tabs> | ||
|
|
||
| 更多类型和版本的安装包,请前往 [TDengine 产品下载中心](https://www.taosdata.com/download-center?product=TDengine+TSDB-Enterprise) 下载。 | ||
| <InstallationTabs /> |
There was a problem hiding this comment.
This page describes TDengine TSDB-Enterprise, but <InstallationTabs /> currently renders download links for TDengine TSDB-OSS (and even a Windows “OSS Client” package) as defined in docs/zh/_installation_tabs.mdx. That’s a user-visible doc regression vs the previous Enterprise-specific PkgList entries on this page. Consider either parameterizing InstallationTabs with a productName prop (OSS vs Enterprise) or creating a separate InstallationTabsEnterprise component/file and using that here.
| <Tabs> | ||
|
|
||
| <TabItem label="Linux - tar.gz 安装" value="tarinst"> | ||
|
|
||
| 1. 从列表中下载获得 tar.gz 安装包: | ||
| <PkgList productName="TDengine TSDB-OSS" platform="Linux-Generic"/> |
There was a problem hiding this comment.
docs/zh/_installation_tabs.mdx uses <Tabs>, <TabItem>, and <PkgList> but does not import them. In this repo, other MDX files that use these components explicitly import them (e.g. docs/zh/06-advanced/06-TDgpt/02-tutorial.md:7-9). When this MDX is imported as a component (<InstallationTabs />), it will be compiled in its own module scope, so it needs its own imports.
| <Tabs> | ||
| <TabItem label="Linux" value="linux"> | ||
|
|
There was a problem hiding this comment.
docs/zh/_start_tabs.mdx uses <Tabs> / <TabItem> but does not import them. Since this MDX is imported and rendered as <StartTabs />, it needs its own @theme/Tabs / @theme/TabItem imports (parent file imports won’t be in scope).
| ## 启动 | ||
|
|
||
| <Tabs> | ||
| <TabItem label="Linux 系统" value="linux"> | ||
|
|
||
| 完成安装后,请在终端执行以下脚本,启动所有服务: | ||
|
|
||
| ```bash | ||
| start-all.sh | ||
| ``` | ||
|
|
||
| TDengine TSDB 的所有组件均使用 systemd 来进行服务管理,可以使用以下命令查看服务的状态: | ||
|
|
||
| ```bash | ||
| sudo systemctl status taosd | ||
| sudo systemctl status taosadapter | ||
| sudo systemctl status taoskeeper | ||
| sudo systemctl status taos-explorer | ||
| ``` | ||
|
|
||
| 如果查看到服务的状态为 "Active: active (running) since ...", 则说明服务已经启动成功。 | ||
|
|
||
| </TabItem> | ||
| <TabItem label="Windows 系统" value="windows"> | ||
|
|
||
| 安装完成后,请以管理员身份打开一个 cmd 窗口。`start-all.bat` 是统一入口脚本,无参数时默认执行启动,也支持 `status` 和 `stop` 子命令。 | ||
|
|
||
| 启动所有服务: | ||
|
|
||
| ```cmd | ||
| C:\TDengine\start-all.bat | ||
| ``` | ||
|
|
||
| 查看服务状态: | ||
|
|
||
| ```cmd | ||
| C:\TDengine\start-all.bat status | ||
| ``` | ||
|
|
||
| 停止所有服务: | ||
|
|
||
| ```cmd | ||
| C:\TDengine\start-all.bat stop | ||
| ``` | ||
|
|
||
| 如果需要分别查看各个 Windows Service 的原始状态,可以使用以下命令: | ||
|
|
||
| ```cmd | ||
| sc query taosd | ||
| sc query taosadapter | ||
| sc query taosx | ||
| sc query taoskeeper | ||
| sc query taos-explorer | ||
| ``` | ||
|
|
||
| 如果 `start-all.bat status` 中显示服务状态为 `running`,或者 `sc query` 输出中包含 `RUNNING`,则说明对应服务已经启动成功。 | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| import Getstarted from './_get_started.mdx' | ||
| <StartTabs /> |
There was a problem hiding this comment.
This Enterprise “package quick start” page previously documented Windows startup via C:\TDengine\start-all.bat and Linux status checks via systemctl status ... (matching the current English version at docs/en/04-get-started/03-package.md:49-92). Switching to the shared <StartTabs /> changes Windows instructions to sc start ... and omits the start-all.bat entrypoint, which looks inconsistent with the Enterprise packaging guidance. Consider providing an Enterprise-specific start tabs component (or parameterizing StartTabs) so this page keeps the Enterprise startup workflow.
|
|
||
| import Getstarted from './_get_started.mdx' | ||
| <StartTabs /> | ||
|
|
There was a problem hiding this comment.
<StartTabs /> includes an internal anchor link to #使用-systemd-drop-in-文件自定义-taosd-启动参数 (defined on docs/zh/08-operation/03-install.md), but this heading does not exist on this page. With the shared component, that link will be broken here. Consider making the link optional/configurable (prop), or avoid using this shared start snippet on pages that don’t contain the referenced section.
| ### 使用 systemd drop-in 文件自定义 taosd 启动参数 | |
| 如需通过 systemd drop-in 文件调整 `taosd` 的启动参数,请参考安装与运维文档中的对应说明。 |
5c69a43 to
299f7d7
Compare
299f7d7 to
5748cd1
Compare
Signed-off-by: WANG Xu <[email protected]>
5748cd1 to
2fba5fc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## 启动 | ||
|
|
||
| <Tabs> | ||
| <TabItem label="Linux 系统" value="linux"> | ||
|
|
||
| 完成安装后,请在终端执行以下脚本,启动所有服务: | ||
|
|
||
| ```bash | ||
| start-all.sh | ||
| ``` | ||
|
|
||
| TDengine TSDB 的所有组件均使用 systemd 来进行服务管理,可以使用以下命令查看服务的状态: | ||
|
|
||
| ```bash | ||
| sudo systemctl status taosd | ||
| sudo systemctl status taosadapter | ||
| sudo systemctl status taoskeeper | ||
| sudo systemctl status taos-explorer | ||
| ``` | ||
|
|
||
| 如果查看到服务的状态为 "Active: active (running) since ...", 则说明服务已经启动成功。 | ||
|
|
||
| </TabItem> | ||
| <TabItem label="Windows 系统" value="windows"> | ||
|
|
||
| 安装完成后,请以管理员身份打开一个 cmd 窗口。`start-all.bat` 是统一入口脚本,无参数时默认执行启动,也支持 `status` 和 `stop` 子命令。 | ||
|
|
||
| 启动所有服务: | ||
|
|
||
| ```cmd | ||
| C:\TDengine\start-all.bat | ||
| ``` | ||
|
|
||
| 查看服务状态: | ||
|
|
||
| ```cmd | ||
| C:\TDengine\start-all.bat status | ||
| ``` | ||
|
|
||
| 停止所有服务: | ||
|
|
||
| ```cmd | ||
| C:\TDengine\start-all.bat stop | ||
| ``` | ||
|
|
||
| 如果需要分别查看各个 Windows Service 的原始状态,可以使用以下命令: | ||
|
|
||
| ```cmd | ||
| sc query taosd | ||
| sc query taosadapter | ||
| sc query taosx | ||
| sc query taoskeeper | ||
| sc query taos-explorer | ||
| ``` | ||
|
|
||
| 如果 `start-all.bat status` 中显示服务状态为 `running`,或者 `sc query` 输出中包含 `RUNNING`,则说明对应服务已经启动成功。 | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| import Getstarted from './_get_started.mdx' | ||
| <StartTabs /> | ||
|
|
||
| <Getstarted /> |
There was a problem hiding this comment.
本页之前的 Windows 启动指引包含 start-all.bat/status/stop 等说明;现在改为复用 <StartTabs /> 后,Windows 只剩 sc start ... 且路径也变为 C:\TDengine TSDB,并且 Linux tab 还包含指向“Systemd drop-in”小节的页内锚点(该锚点在本页不存在)。如果本页仍定位为企业版“快速体验”,建议提供专用的 StartTabs(或通过 props 控制是否展示该链接与 Windows 启动方式),避免引入不适用/失效的指引。
|
|
||
| - `systemctl` 命令需要 _root_ 权限来运行,如果您非 _root_ 用户,请在命令前添加 `sudo`。 | ||
| - `systemctl stop taosd` 指令在执行后并不会马上停止 TDengine TSDB 服务,而是会等待系统中必要的落盘工作正常完成。在数据量很大的情况下,这可能会消耗较长时间。 | ||
| - 如果系统中不支持 `systemd`,也可以用手动运行 `/usr/local/taos/bin/taosd` 方式启动 TDengine TSDB 服务。 |
There was a problem hiding this comment.
这里使用了页内锚点 #使用-systemd-drop-in-文件自定义-taosd-启动参数。由于 _start_tabs.mdx 被多个页面复用(例如 get-started 页面并没有该小节),会导致部分页面出现失效链接。建议将链接改为指向固定文档路径(例如安装部署章节的绝对/相对链接),或把该链接作为可选项通过 props 控制,仅在包含对应小节的页面里展示。
| - 如果系统中不支持 `systemd`,也可以用手动运行 `/usr/local/taos/bin/taosd` 方式启动 TDengine TSDB 服务。 | |
| - 如果系统中不支持 `systemd`,也可以用手动运行 `/usr/local/taos/bin/taosd` 的方式启动 TDengine TSDB 服务。 |
| 安装后,可以直接运行以下脚本来启动所有服务: | ||
|
|
||
| ```bash | ||
| start-all.sh |
There was a problem hiding this comment.
代码块中的 start-all.sh 行末存在多余空格(start-all.sh ),会影响文档的可读性/复制粘贴一致性。建议移除行尾空白。
| start-all.sh | |
| start-all.sh |
| - `sudo launchctl list | grep taosd` 指令返回的第一列是 `taosd` 程序的 PID,若为 `-` 则说明 TDengine TSDB 服务未运行。 | ||
| - 如果服务异常请查看系统日志 `launchd.log` 或者 `/var/log/taos` 目录下 `taosdlog` 日志获取更多信息。 | ||
|
|
||
| ::: | ||
|
|
There was a problem hiding this comment.
macOS 这段 :::info 里的列表当前是两条并列 bullet(先是“故障排查:”,下一条才是具体说明),渲染后会显得像一个空的条目标题。建议将“故障排查:”与后面的说明合并为同一个列表项,或改成普通文本标题以避免列表结构异常。
| <TabItem label="Linux - tar.gz 安装" value="tarinst"> | ||
|
|
||
| 1. 从列表中下载获得 tar.gz 安装包: | ||
| <PkgList productName="TDengine TSDB-OSS" platform="Linux-Generic"/> | ||
| 2. 进入到安装包所在目录,使用 `tar` 解压安装包; |
There was a problem hiding this comment.
该组件名为 _installation_tabs.mdx 且被多个页面复用,但内部下载项硬编码为 TDengine TSDB-OSS / TDengine TSDB-OSS Client(见这里的 productName)。这会让“企业版快速体验”等页面在复用时很容易引入错误的安装包下载入口。建议将组件改为可配置(通过 props 传入 productName/平台/是否显示某些 tab),或至少将文件/组件命名显式标明是 OSS 版本以避免误用。
Description
Issue(s)
Checklist
Please check the items in the checklist if applicable.