-
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?
test0328 #11
Changes from all commits
06b6e47
61164d3
86e7cef
4d75fac
2ce3547
c246416
12295bb
a16634b
88a88ee
9c09339
dd656fc
18bfb90
60148eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,26 @@ | ||||||
| --- | ||||||
| title: DDL 常见问题 | ||||||
| summary: 介绍 DDL 相关的常见问题。 | ||||||
| --- | ||||||
|
|
||||||
| # DDL 常见问题 | ||||||
|
|
||||||
| 本文档介绍 TiDB 集群中常见的些 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 commentThe reason will be displayed to describe this comment to others. Learn more. 该句存在多处语法错误和拼写错误,建议修正。
Suggested change
|
||||||
|
|
||||||
| 1. 需要判断 DDL 语句间是否有相关性,如果有相关性的 DDL 语句将会按照进入 TiDB 的顺序执行,没有相关性的 DDL 语句可以并发执行。并发判断规则: | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 列表项格式不一致,建议统一使用阿拉伯数字或中文数字。
Suggested change
|
||||||
| 1. 相同表上的 DDL 语句之间具有相关性,需要按照进入 TiDB 的顺序执行; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 标点符号使用不一致,建议统一使用分号或句号。
Suggested change
|
||||||
| 2. 对于 Schema 上的操作,可能会对于 schema 中的表上的 DDL 语句建立相关性,目前 Drop Schema 会对于其包含 Schema 上的 DDL 产生相关性;也需要顺序执行; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 句子结构不够清晰,建议拆分长句。
Suggested change
|
||||||
| 2. 是否所有的 DDL 语句都会并发执行? | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 问题表述不够直接,建议简化。
Suggested change
|
||||||
| 当前,答案是否定的,在 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 commentThe reason will be displayed to describe this comment to others. Learn more. 技术术语"重组"建议使用更专业的"reorg"全称。
Suggested change
|
||||||
| 当前我们仅对于需要重组的 DDL 语句启动了并发执行支持。 | ||||||
| 3. 对于启动了并发 DDL 语句支持的 TiDB 集群,DDL 语句间的并发度是如何确定的? | ||||||
| 目前因为 DDL 等后台任务的执行可能会占用相当的资源,因此我们采取了一个相对保守的策略来确定 DDL 语句执行的并发度 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 表述不够简洁,建议简化。
Suggested change
|
||||||
| 1. 对于普通 DDL(general DDL) 语句,我们当前语句并发度为 1(后续将会提供并发执行支持); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 括号内容与前面重复,建议删除。
Suggested change
|
||||||
| 2. 对于需要重组的 DDL(Reorg DDL)语句,我们的并发度设置规则如下(并发度不允许用户自己设置): | ||||||
| TiDB DDL owner 节点容器能够使用的 CPU 资源数量的 1/4 与 1 之间的最大值,例如 8C 规格的 TiDB DDL owner 节点,并发度将会是 2。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 技术细节表述不够清晰,建议补充说明。
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,9 +8,9 @@ aliases: ['/docs-cn/dev/tikv-configuration-file/','/docs-cn/dev/reference/config | |||||
|
|
||||||
| <!-- 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 commentThe reason will be displayed to describe this comment to others. Learn more. 句子不完整且存在错别字,建议修正语法错误并补充完整信息。
Suggested change
|
||||||
|
|
||||||
| 本文档只阐述未包含在命令行参数中的参数,命令行参数参见 [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 commentThe reason will be displayed to describe this comment to others. Learn more. 句子不完整,缺少动词,建议补充完整。
Suggested change
|
||||||
|
|
||||||
| > **Tip:** | ||||||
| > | ||||||
|
|
@@ -32,7 +32,7 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con | |||||
| ### `slow-log-file` | ||||||
|
|
||||||
| + 存储慢日志的文件。 | ||||||
| + 如果未设置本项但设置了 `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 commentThe reason will be displayed to describe this comment to others. Learn more. 句子末尾的"输出"重复,建议删除一个。
Suggested change
|
||||||
| + 如果本项和 `log.file.filename` 均未设置,所有日志默认输出到 `"stderr"`。 | ||||||
| + 如果同时设置了两项,普通日志会输出至 `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.
标题中的"怎样地"不符合中文表达习惯,建议修改为更自然的表达方式。