Skip to content

Commit

Permalink
review: update tidb_ddl_enable_fast_reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt committed Sep 9, 2022
1 parent d5e1115 commit 2112c09
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
36 changes: 18 additions & 18 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,24 @@ Constraint checking is always performed in place for pessimistic transactions (d
- Default value: `0`
- This variable is read-only. It is used to obtain the timestamp of the current transaction.

### tidb_ddl_disk_quota <span class="version-mark">New in v6.3.0</span>

- Scope: GLOBAL
- Persists to cluster: Yes
- Type: Integer
- Default value: `107374182400` (100 GiB)
- Range: `[107374182400, 1125899906842624]` ([100 GiB, 1 PiB])
- Unit: Bytes
- This variable only takes effect when [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) is enabled and is used to set the usage limit of local storage during backfilling when creating an index.

### tidb_ddl_enable_fast_reorg <span class="version-mark">New in v6.3.0</span>

- Scope: GLOBAL
- Persists to cluster: Yes
- Type: Boolean
- Default value: `OFF`
- This variable controls whether to enable the acceleration of `ADD INDEX` and `CREATE INDEX` DDl operations to improve the speed of backfilling when creating an index. If this variable is enabled, TiDB uses a more effective way to create an index.

### tidb_ddl_error_count_limit

- Scope: GLOBAL
Expand Down Expand Up @@ -852,24 +870,6 @@ Constraint checking is always performed in place for pessimistic transactions (d
- Unit: Threads
- This variable is used to set the concurrency of the DDL operation in the `re-organize` phase.

### tidb_ddl_enable_fast_reorg <span class="version-mark">New in v6.3.0</span>

- Scope: GLOBAL
- Persists to cluster: Yes
- Type: Boolean
- Default value: `OFF`
- This variable enable/disable add/create index DDL task to go fast reorg solution in `re-organize` phase.

### tidb_ddl_disk_quota <span class="version-mark">New in v6.3.0</span>

- Scope: GLOBAL
- Persists to cluster: Yes
- Type: Integer
- Default value: `107374182400` (100 GiB)
- Range: `[107374182400, 1125899906842624]` ([100 GiB, 1 PiB])
- Unit: Bytes
- This variable sets a threshold of fast reorg solution which indicates how much index data could be temp stored in TiDB local storage.

### tidb_default_string_match_selectivity <span class="version-mark">New in v6.2.0</span>

- Scope: SESSION | GLOBAL
Expand Down
11 changes: 6 additions & 5 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,12 @@ Configuration items related to the PROXY protocol.
>
> Use `*` with caution because it might introduce security risks by allowing a client of any IP address to report its IP address. In addition, using `*` might also cause the internal component that directly connects to TiDB (such as TiDB Dashboard) to be unavailable.
### `temp-dir` <span class="version-mark">New in v6.3.0</span>

+ File system location used by TiDB to store temporary data. Features that require local storage in TiDB nodes will store temporary data in this location.
+ When creating an index, if [`tidb_ddl_enable_fast_reorg`](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630) is enabled, data that needs to be backfilled for a newly created index will be at first stored in the TiDB local temporary directory, and then imported into TiKV in batches, thus accelerating the index creation.
+ Default value: `"/tmp/tidb"`

## experimental

The `experimental` section, introduced in v3.1.0, describes the configurations related to the experimental features of TiDB.
Expand All @@ -708,8 +714,3 @@ The `experimental` section, introduced in v3.1.0, describes the configurations r

+ Controls whether an expression index can be created. Since TiDB v5.2.0, if the function in an expression is safe, you can create an expression index directly based on this function without enabling this configuration. If you want to create an expression index based on other functions, you can enable this configuration, but correctness issues might exist. By querying the `tidb_allow_function_for_expression_index` variable, you can get the functions that are safe to be directly used for creating an expression.
+ Default value: `false`

### `temp-dir` <span class="version-mark">New in v6.3.0</span>

+ used to set a local temp storage dir for TiDB node, all features that need used TiDB temp storage should use this dir as entry path. the add/create index fast reorg solution will also follow this rule to create a sub dir under this parameter and store temporary backfill index data in TiDB local storage.
+ Default value: "/tmp/tidb"

0 comments on commit 2112c09

Please sign in to comment.