-
Notifications
You must be signed in to change notification settings - Fork 0
test0328 #11
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
|
WalkthroughA new FAQ document titled "DDL 常见问题" has been added. The document provides an overview of concurrent DDL execution in TiDB version 6.2. It explains how DDL statements are categorized into general and reorg types, details dependency-based ordering for concurrent execution, and describes how available CPU resources influence the concurrency level, especially for reorg DDL statements. Additionally, minor textual corrections have been made in the Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant S as DDL Scheduler
participant G as General DDL Executor
participant R as Reorg DDL Executor
C->>S: Submit DDL Statement
alt General DDL Statement
S->>G: Execute sequentially (concurrency = 1)
else Reorg DDL Statement
S->>R: Assess available CPU resources
R-->>S: Return concurrency details (max 2 for 8-core)
S->>R: Execute concurrently
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 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 (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
/bot-review |
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 (5)
faq/ddl-faq-test3.md (5)
6-8
: Header and Introduction Text.
The document title and header are consistent. However, the sentence "本文档介绍 TiDB 中常见的些 DDL 问题" could be improved for clarity. Consider revising it to "本文档介绍 TiDB 中的一些常见 DDL 问题."
10-11
: Question Heading Clarity.
The heading "## TiDB DDL 是否支持 DDL 语句间并行?具体的一些运行特征是怎样地?" is clear in intent. For a more formal tone, consider rephrasing "具体的一些运行特征是怎样地?" to "具体运行特征是什么?"
14-16
: Dependency Rules for DDL Statements.
The numbered list clearly explains how dependency between DDL statements is determined. Consider refining the language in bullet 2—particularly the explanation about "Drop Schema" inducing dependency—to enhance readability and clarity.
17-21
: Categorization of DDL Statements.
The document nicely differentiates between general and reorg DDL statements, explaining their execution characteristics. Including a brief example for each category might further aid reader understanding, but the current explanation is sufficiently informative.
22-26
: Clarity on Concurrency Degree Calculation.
This section explains the strategy for setting the DDL concurrency degree. The wording in line 26—"TiDB DDL owner 节点容器能够使用的 CPU 资源数量的 1/4 与 1 之间的最大值"—could be clarified further. For example, consider rephrasing it to:
"并发度为可用 CPU 资源数的 1/4 与 1 之间取较大值,例如,8 核的 TiDB DDL owner 节点的并发度将为 2."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
faq/ddl-faq-test3.md
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: pull
🔇 Additional comments (2)
faq/ddl-faq-test3.md (2)
1-4
: YAML Front Matter is well-structured.
The metadata section provides a clear title and summary that align well with the FAQ’s content.
12-13
: Overview of Concurrent DDL Execution.
This section effectively introduces the capability introduced in TiDB v6.2 regarding concurrent DDL execution. The context and high-level changes are well explained.
|
||
在 TiDB v6.2 之后,TiDB 提供并发 DDL(concurrent DDL) 执行的能力。 并发 DDL 主要是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执行将会发生如下变化: | ||
|
||
1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: |
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.
列表项格式不一致,建议统一使用阿拉伯数字或中文数字。
1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | |
1. 需要判断 DDL 语句间是否有相关性。有相关性的 DDL 语句将按进入 TiDB 的顺序执行,没有相关性的可以并发执行。判断规则如下: |
在 TiDB v6.2 之后,TiDB 提供并发 DDL(concurrent DDL) 执行的能力。 并发 DDL 主要是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执行将会发生如下变化: | ||
|
||
1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | ||
1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; |
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.
标点符号使用不一致,建议统一使用分号或句号。
1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; | |
1. 相同表上的 DDL 语句之间具有相关性,需要按进入 TiDB 的顺序执行; |
|
||
1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | ||
1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; | ||
2. 对于 Schema 上的操作,可能会对于 schema 中的表上的 DDL 语句建立相关性,目前 Drop Schema 会对于其包含 Schema 上的 DDL 产生相关性;也需要顺序执行; |
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.
句子结构不够清晰,建议拆分长句。
2. 对于 Schema 上的操作,可能会对于 schema 中的表上的 DDL 语句建立相关性,目前 Drop Schema 会对于其包含 Schema 上的 DDL 产生相关性;也需要顺序执行; | |
2. 对于 Schema 上的操作,可能会影响 schema 中表上的 DDL 语句。目前 Drop Schema 会对其包含的 schema 上的 DDL 产生相关性,这些语句也需要顺序执行。 |
1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | ||
1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; | ||
2. 对于 Schema 上的操作,可能会对于 schema 中的表上的 DDL 语句建立相关性,目前 Drop Schema 会对于其包含 Schema 上的 DDL 产生相关性;也需要顺序执行; | ||
2. 是否所有的 DDL 语句都会并发执行? |
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.
问题表述不够直接,建议简化。
2. 是否所有的 DDL 语句都会并发执行? | |
2. 是否所有 DDL 语句都能并发执行? |
2. 是否所有的 DDL 语句都会并发执行? | ||
当前,答案是否定的,在 TiDB 中 DDL 语句被分为两类, | ||
1. 普通(general)DDL 语句,这类 DDL 语句的执行只需要修改对象的元数据,不需要操作 schema 存储的数据,通常在秒级完成;需要的计算资源相对少; | ||
2. 需要重组(reorg)DDL 语句, 这类 DDL 语句的执行不仅需要修改对象的元数据,也需要对于 schema 存储的数据进行处理,例如:加索引,需要扫描全表数据,来创建索引,需要比较多的计算资源与较长的执行时间; |
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.
技术术语"重组"建议使用更专业的"reorg"全称。
2. 需要重组(reorg)DDL 语句, 这类 DDL 语句的执行不仅需要修改对象的元数据,也需要对于 schema 存储的数据进行处理,例如:加索引,需要扫描全表数据,来创建索引,需要比较多的计算资源与较长的执行时间; | |
2. 需要重组数据(reorg)的 DDL 语句:这类 DDL 语句不仅需要修改元数据,还需要处理 schema 存储的数据。 |
2. 需要重组(reorg)DDL 语句, 这类 DDL 语句的执行不仅需要修改对象的元数据,也需要对于 schema 存储的数据进行处理,例如:加索引,需要扫描全表数据,来创建索引,需要比较多的计算资源与较长的执行时间; | ||
当前我们仅对于需要重组的 DDL 语句启动了并发执行支持。 | ||
3. 对于启动了并发 DDL 语句支持的 TiDB 集群,DDL 语句间的并发度是如何确定的? | ||
目前因为 DDL 等后台任务的执行可能会占用相当的资源,因此我们采取了一个相对保守的策略来确定 DDL 语句执行的并发度 |
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.
表述不够简洁,建议简化。
目前因为 DDL 等后台任务的执行可能会占用相当的资源,因此我们采取了一个相对保守的策略来确定 DDL 语句执行的并发度 | |
3. 并发 DDL 语句的并发度是如何确定的? |
当前我们仅对于需要重组的 DDL 语句启动了并发执行支持。 | ||
3. 对于启动了并发 DDL 语句支持的 TiDB 集群,DDL 语句间的并发度是如何确定的? | ||
目前因为 DDL 等后台任务的执行可能会占用相当的资源,因此我们采取了一个相对保守的策略来确定 DDL 语句执行的并发度 | ||
1. 对于普通 DDL(general DDL) 语句,我们当前语句并发度为 1(后续将会提供并发执行支持); |
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.
括号内容与前面重复,建议删除。
1. 对于普通 DDL(general DDL) 语句,我们当前语句并发度为 1(后续将会提供并发执行支持); | |
1. 对于普通 DDL 语句,当前并发度为 1(后续将支持并发执行); |
目前因为 DDL 等后台任务的执行可能会占用相当的资源,因此我们采取了一个相对保守的策略来确定 DDL 语句执行的并发度 | ||
1. 对于普通 DDL(general DDL) 语句,我们当前语句并发度为 1(后续将会提供并发执行支持); | ||
2. 对于需要重组的 DDL(Reorg DDL)语句,我们的并发度设置规则如下(并发度不允许用户自己设置): | ||
TiDB DDL owner 节点容器能够使用的 CPU 资源数量的 1/4 与 1 之间的最大值,例如 8C 规格的 TiDB DDL owner 节点,并发度将会是 2。 No newline at end of file |
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.
技术细节表述不够清晰,建议补充说明。
TiDB DDL owner 节点容器能够使用的 CPU 资源数量的 1/4 与 1 之间的最大值,例如 8C 规格的 TiDB DDL owner 节点,并发度将会是 2。 | |
TiDB DDL owner 节点容器能够使用的 CPU 核心数的 1/4 与 1 之间的最大值(向下取整)。例如 8 核的 TiDB DDL owner 节点,并发度为 2。 |
✅ Code review completed, 11 comments generated. |
/bot-review: 61164d3 |
✅ Code review completed, 1 comments generated. |
✅ Code review completed, 1 comments generated. |
✅ Code review completed, 1 comments generated. |
✅ Code review completed, 1 comments generated. |
✅ Code review completed, 1 comments generated. |
✅ Code review completed, 3 comments generated. |
|
||
本文档介绍 TiDB 集群中常见的些 DDL 问题。 | ||
|
||
## TiDB DDL 是否支持 DDL 语句间并行?具体一些运行特征是怎样地? |
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.
标题中的"怎样地"不符合中文表达习惯,建议修改为更自然的表达方式。
## TiDB DDL 是否支持 DDL 语句间并行?具体一些运行特征是怎样地? | |
## TiDB DDL 是否支持 DDL 语句间并行?具体的运行特征是怎样的? |
|
||
## TiDB DDL 是否支持 DDL 语句间并行?具体一些运行特征是怎样地? | ||
|
||
在 TiDB v6.2 之后时,TiDB 提供并发 DDL(concurent DDL) 执行的能力。 并发 DDL 主是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执将会发生如下变化: |
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.
该句存在多处语法错误和拼写错误,建议修正。
在 TiDB v6.2 之后时,TiDB 提供并发 DDL(concurent DDL) 执行的能力。 并发 DDL 主是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执将会发生如下变化: | |
在 TiDB v6.2 之后,TiDB 提供并发 DDL(concurrent DDL)执行的能力。并发 DDL 主要是提供 DDL 语句间的并发执行支持。这里和以前的 DDL 执行将会发生如下变化: |
tikv-configuration-file.md
Outdated
<!-- markdownlint-disable MD001 --> | ||
|
||
TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配置文件,重命名为 config.toml 即可。 | ||
TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配文件,重名为 config.toml 即可。 |
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.
原文中的"配置文件"和"重命名"被错误地简化为"配文件"和"重名为",建议恢复完整表述以确保专业性和准确性。
TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配文件,重名为 config.toml 即可。 | |
TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配置文件,重命名为 config.toml 即可。 |
/bot-review: 9c09339 |
✅ Code review completed, 1 comments generated. |
/bot-review: dd656fc |
TiKV 配置文件比命令行参数支持更多的选。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配文件,重名为 config.toml 即可。 | ||
|
||
本文档只阐述未包含在命令行参数中的参数,命令行参数参见 [TiKV 配置参数](/command-line-flags-for-tikv-configuration.md)。 | ||
本文档只阐未包含在命令行参数中的参数,命令行参数参见 [TiKV 配置参数](/command-line-flags-for-tikv-configuration.md)。 |
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.
句子不完整,缺少动词,建议补充完整。
本文档只阐未包含在命令行参数中的参数,命令行参数参见 [TiKV 配置参数](/command-line-flags-for-tikv-configuration.md)。 | |
本文档只阐述未包含在命令行参数中的参数,命令行参数参见 [TiKV 配置参数](/command-line-flags-for-tikv-configuration.md)。 |
✅ Code review completed, 1 comments generated. |
/bot-review: 18bfb90 |
|
||
+ 存储慢日志的文件。 | ||
+ 如果未设置本项但设置了 `log.file.filename`,慢日志将输出至 `log.file.filename` 指定的日志文件中。 | ||
+ 如果未设置本项但设置了 `log.file.filename`,慢日志将输出至 `log.file.filename` 指定的日志文件中输出。 |
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.
句子末尾的"输出"重复,建议删除一个。
+ 如果未设置本项但设置了 `log.file.filename`,慢日志将输出至 `log.file.filename` 指定的日志文件中输出。 | |
+ 如果未设置本项但设置了 `log.file.filename`,慢日志将输出至 `log.file.filename` 指定的日志文件中。 |
✅ AI review completed, 1 comments generated. |
✅ AI review completed, 1 comments generated. |
/bot-review: 60148eb |
✅ AI review completed, 1 comments generated. |
<!-- markdownlint-disable MD001 --> | ||
|
||
TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配置文件,重命名为 config.toml 即可。 | ||
TiKV 配置文件比命令行参数支持更多的选。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配文件,重名为 config.toml 即。 |
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.
句子不完整且存在错别字,建议修正语法错误并补充完整信息。
TiKV 配置文件比命令行参数支持更多的选。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配文件,重名为 config.toml 即。 | |
TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) 找到默认值的配置文件,将其重命名为 config.toml 即可使用。 |
…0035
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
tikv-configuration-file.md
for clarity, including a new description for theslow-log-file
configuration.