Skip to content
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

lightning: reformat TiDB Lightning config #19167

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Oreoxmt
Copy link
Collaborator

@Oreoxmt Oreoxmt commented Nov 28, 2024

What is changed, added or deleted? (Required)

lightning: reformat TiDB Lightning config
ref: pingcap/docs#19523

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)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 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)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

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

Copy link

ti-chi-bot bot commented Nov 28, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2024
Copy link

ti-chi-bot bot commented Nov 28, 2024

[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 ask for approval from oreoxmt, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

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 missing-translation-status This PR does not have translation status info. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 28, 2024
@Oreoxmt Oreoxmt added type/enhancement The issue or PR belongs to an enhancement. translation/doing This PR’s assignee is translating this PR. labels Nov 28, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Nov 28, 2024
@Oreoxmt
Copy link
Collaborator Author

Oreoxmt commented Nov 28, 2024

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2024
@Oreoxmt Oreoxmt force-pushed the reformat-config-tidblightning branch from 08f842c to 5241a65 Compare December 25, 2024 10:17
@Oreoxmt Oreoxmt added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Dec 25, 2024
github-actions bot pushed a commit to Oreoxmt/pingcap-docsite-preview that referenced this pull request Dec 25, 2024
@Oreoxmt Oreoxmt marked this pull request as ready for review December 25, 2024 10:32
Comment on lines 631 to 633
- 默认值为 `"false"`,表示通过 TiDB Lightning 下发 `ADMIN CHECKSUM TABLE <table>` 命令给 TiKV 执行。
- 建议将该值设为 `"true"`,以便在 checksum 失败时更容易定位问题。当该值为 `"true"` 时,如果需要调整并发,请在 TiDB 中设置 [`tidb_checksum_table_concurrency`](/system-variables.md#tidb_checksum_table_concurrency) 变量。
- 默认值:`"false"`
Copy link
Collaborator

@hfxsd hfxsd Dec 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 默认值为 `"false"`,表示通过 TiDB Lightning 下发 `ADMIN CHECKSUM TABLE <table>` 命令给 TiKV 执行。
- 建议将该值设为 `"true"`,以便在 checksum 失败时更容易定位问题。当该值为 `"true"` 时,如果需要调整并发,请在 TiDB 中设置 [`tidb_checksum_table_concurrency`](/system-variables.md#tidb_checksum_table_concurrency) 变量。
- 默认值:`"false"`
- 默认值:`"false"`
- 可选值:
- `"false"`:表示通过 TiDB Lightning 下发 `ADMIN CHECKSUM TABLE <table>` 命令给 TiKV 执行。
- `"true"`:当该值为 `"true"` 时,如果要调整并发,需要在 TiDB 中设置 [`tidb_checksum_table_concurrency`](/system-variables.md#tidb_checksum_table_concurrency) 系统变量。
- 建议将该值设为 `"true"`,以便在执行 CHECKSUM 失败时更容易定位问题。

#### `check-disk-quota`

- 使用物理导入模式时,检查本地磁盘配额的时间间隔。
- 默认值:`"60s"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

取值范围?


- 物理导入模式下,向 TiKV 发送数据时一次请求中最大 KV 数量。

<!-- 示例值:32768 -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认值?

- 如果“导入”更快,区块大小的差异就会更小;比值为 0 时则说明区块大小一致。
- 取值范围:`[0, 1)`

<!-- 示例值:`0.75` -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认值?

- 设置 TiDB 会话变量,提升 Checksum 和 Analyze 的速度。详情参考[控制 `ANALYZE` 并发度](/statistics.md#控制-analyze-并发度)。
- 如果将 [`checksum-via-sql`](#checksum-via-sql) 设置为 `"true"`,则会通过 TiDB 执行 `ADMIN CHECKSUM TABLE <table>` SQL 语句来进行 Checksum 操作。在这种情况下,`distsql-scan-concurrency` 参数设置不会生效

<!-- 示例值:`15` -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认值?


- 设置 TiDB 会话变量,提升 Checksum 和 Analyze 的速度。详情参考[控制 `ANALYZE` 并发度](/statistics.md#控制-analyze-并发度)。

<!-- 示例值:`20` -->
Copy link
Collaborator

@hfxsd hfxsd Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

系统变量 tidb_build_stats_concurrency 的默认值是 2,是否需要和这个配置项的默认值相同?


设置其他 TiDB 会话变量。

#### `tidb_enable_clustered_index`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是个系统变量,好像应该删掉?可能在以前的文档里只是举例。


- 解析和执行 SQL 语句的默认 SQL 模式。

<!-- 示例值:`"ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER"` -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认值和可选值?

- 设置数据库连接允许的最大数据包大小,对应于系统参数中的 `max_allowed_packet`。
- 如果设置为 `0`,会使用下游数据库 global 级别的 `max_allowed_packet`。

<!-- 示例值:`67_108_864` -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

取值范围和默认值?

Comment on lines 621 to 624
- 可选值:
- `"required"`:在导入完成后执行 CHECKSUM 检查,如果 CHECKSUM 检查失败,则会报错退出
- `"optional"`:在导入完成后执行 CHECKSUM 检查,如果报错,会输出一条 WARN 日志并忽略错误
- `"off"`:导入结束后不执行 CHECKSUM 检查
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 可选值:
- `"required"`:在导入完成后执行 CHECKSUM 检查,如果 CHECKSUM 检查失败,则会报错退出
- `"optional"`:在导入完成后执行 CHECKSUM 检查,如果报错,会输出一条 WARN 日志并忽略错误
- `"off"`:导入结束后不执行 CHECKSUM 检查
- 可选值:
- `"required"`:在导入完成后执行 CHECKSUM 检查,如果 CHECKSUM 检查失败,则会报错退出
- `"optional"`:在导入完成后执行 CHECKSUM 检查,如果报错,会输出一条 WARN 日志并忽略错误
- `"off"`:导入结束后不执行 CHECKSUM 检查


- TiDB Lightning 自动刷新导入模式状态的持续时间,该值应小于 TiKV 对应的设定值。

<!-- 示例值:`"5m"` -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认值和取值范围?


- 在日志中打印导入进度的持续时间。

<!-- 示例值:`"5m"` -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认值和取值范围?

Copy link

ti-chi-bot bot commented Jan 22, 2025

@Oreoxmt: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-verify e126de8 link true /test pull-verify

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.


#### `table-concurrency`

- 数据引擎的最大并行数。每张表被切分成一个用于存储索引的“索引引擎”和若干存储行数据的“数据引擎”。`index-concurrency` 和 `table-concurrency` 这两项设置控制两种引擎文件的最大并发数。通常情况下,你可以使用默认值。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 数据引擎的最大并行数。每张表被切分成一个用于存储索引的“索引引擎”和若干存储行数据的“数据引擎”。`index-concurrency``table-concurrency` 这两项设置控制两种引擎文件的最大并发数。通常情况下,你可以使用默认值
- 数据引擎的最大并行数。每张表被切分成一个用于存储索引的“索引引擎”和若干存储行数据的“数据引擎”。`index-concurrency``table-concurrency` 这两项设置控制两种引擎文件的最大并发数。通常情况下使用默认值


#### `parallel-import`

- 是否允许启动多个 TiDB Lightning 实例(物理导入模式)并行导入数据到一个或多个目标表。该参数仅限目标表为空的场景使用。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 是否允许启动多个 TiDB Lightning 实例(物理导入模式)并行导入数据到一个或多个目标表。该参数仅限目标表为空的场景使用。
- 是否允许启动多个 TiDB Lightning 实例(物理导入模式)[并行导入数据](/tidb-lightning/tidb-lightning-distributed-import.md)到一个或多个目标表。该参数仅限目标表为空的场景使用。

Comment on lines +371 to +372
- 该参数用于设置在完全并发下,“导入”和“写入”过程的持续时间比。该值可以通过计算 1 GiB 大小的单张表的(导入时长/写入时长)得到。你可以在日志文件中查看精确的时间。
- 如果“导入“更快,区块大小的差异就会更小。比值为 `0` 表示区块大小相同。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 该参数用于设置在完全并发下,“导入”和“写入”过程的持续时间比。该值可以通过计算 1 GiB 大小的单张表的(导入时长/写入时长)得到。你可以在日志文件中查看精确的时间。
- 如果“导入“更快,区块大小的差异就会更小。比值为 `0` 表示区块大小相同。
- 该参数用于设置在完全并发下,导入和写入过程的持续时间比。该值可以通过计算 1 GiB 大小的单张表的(导入时长/写入时长)得到。你可以在日志文件中查看精确的时间。
- 如果导入更快,区块大小的差异就会更小。比值为 `0` 表示区块大小相同。

<!-- 示例值:`67_108_864` -->

#### `tls`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines +643 to +645
- `"required"`:在导入完成后执行 CHECKSUM 检查,如果 CHECKSUM 检查失败,则会报错退出
- `"optional"`:在导入完成后执行 CHECKSUM 检查,如果报错,会输出一条 WARN 日志并忽略错误
- `"off"`:导入结束后不执行 CHECKSUM 检查
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `"required"`:在导入完成后执行 CHECKSUM 检查,如果 CHECKSUM 检查失败,则会报错退出
- `"optional"`:在导入完成后执行 CHECKSUM 检查,如果报错,会输出一条 WARN 日志并忽略错误
- `"off"`:导入结束后不执行 CHECKSUM 检查
- `"required"`:在导入完成后执行 Checksum 检查,如果 Checksum 检查失败,则会报错退出
- `"optional"`:在导入完成后执行 Checksum 检查,如果报错,会输出一条 WARN 日志并忽略错误
- `"off"`:导入结束后不执行 Checksum 检查

- 可选值:
- `"false"`:表示通过 TiDB Lightning 下发 `ADMIN CHECKSUM TABLE <table>` 命令给 TiKV 执行。
- `"true"`:当该值为 `"true"` 时,如果要调整并发,需要在 TiDB 中设置 [`tidb_checksum_table_concurrency`](/system-variables.md#tidb_checksum_table_concurrency) 系统变量。
- 建议将该值设为 `"true"`,以便在执行 CHECKSUM 失败时更容易定位问题。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 建议将该值设为 `"true"`,以便在执行 CHECKSUM 失败时更容易定位问题。
- 建议将该值设为 `"true"`,以便在执行 Checksum 失败时更容易定位问题。


#### `analyze`

- 配置是否在 CHECKSUM 结束后对所有表逐个执行 `ANALYZE TABLE <table>` 操作。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 配置是否在 CHECKSUM 结束后对所有表逐个执行 `ANALYZE TABLE <table>` 操作。
- 配置是否在 Checksum 结束后对所有表逐个执行 `ANALYZE TABLE <table>` 操作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. translation/doing This PR’s assignee is translating this PR. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants