Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lilian Lee <[email protected]>
  • Loading branch information
hfxsd and lilin90 authored Aug 12, 2024
1 parent bc5adf0 commit 0b1344b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions accelerated-table-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ aliases: ['/tidb/dev/ddl-v2/']

TiDB v7.6.0 introduces the system variable [`tidb_ddl_version`](https://docs.pingcap.com/tidb/v7.6/system-variables#tidb_enable_fast_create_table-new-in-v800) to support accelerating table creation, which improves the efficiency of bulk table creation. Starting from v8.0.0, this system variable is renamed to [`tidb_enable_fast_create_table`](/system-variables.md#tidb_enable_fast_create_table-new-in-v800).

When [`tidb_enable_fast_create_table`](/system-variables.md#tidb_enable_fast_create_table-new-in-v800) is enabled, table creation statements for the same schema submitted to the same TiDB node at the same time will be merged into a batch table creation statement to improve table creation performance. Therefore, to improve the table creation performance, you need several sessions to connect to the same TiDB node to create tables under the same schema concurrently and increase the concurrency appropriately.
When you enable accelerated table creation via [`tidb_enable_fast_create_table`](/system-variables.md#tidb_enable_fast_create_table-new-in-v800), table creation statements with the same schema committed to the same TiDB node at the same time are merged into batch table creation statements to improve table creation performance. Therefore, to improve the table creation performance, try to connect to the same TiDB node, create tables with the same schema concurrently, and increase the concurrency appropriately.

The merged bulk table creation statements are executed within the same transaction, so if one of them fails, all of them will fail.
The merged batch table creation statements are executed within the same transaction, so if one statement of them fails, all of them will fail.

> **Warning:**
>
Expand Down
2 changes: 1 addition & 1 deletion upgrade-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This document is targeted for the following upgrade paths:
> 3. **DO NOT** upgrade a TiDB cluster when a DDL statement is being executed in the cluster (usually for the time-consuming DDL statements such as `ADD INDEX` and the column type changes). Before the upgrade, it is recommended to use the [`ADMIN SHOW DDL`](/sql-statements/sql-statement-admin-show-ddl.md) command to check whether the TiDB cluster has an ongoing DDL job. If the cluster has a DDL job, to upgrade the cluster, wait until the DDL execution is finished or use the [`ADMIN CANCEL DDL`](/sql-statements/sql-statement-admin-cancel-ddl.md) command to cancel the DDL job before you upgrade the cluster.
> 4. If the TiDB version before upgrade is 7.1.0 or later, you can ignore the preceding warnings 2 and 3. For more information, see [limitations on using TiDB smooth upgrade](/smooth-upgrade-tidb.md#limitations).
> 5. Be sure to read [limitations on user operations](/smooth-upgrade-tidb.md#limitations-on-user-operations) before upgrading your TiDB cluster using TiUP.
> 6. If the current cluster version is from TiDB v7.6.0 to v8.2.0, the upgrade target version is v8.3.0 or later, and [`tidb_enable_fast_create_table`](/system-variables.md#tidb_enable_fast_create_table-new-in-v800) is enabled, you need to disable this feature first, and then enable it as needed after the upgrade is completed. Otherwise, some metadata KVs added by this feature will remain in the cluster. Starting from v8.3.0, this feature has been optimized. Upgrading to a higher version will no longer generate and retain this type of metadata KVs.
> 6. If the version of your current TiDB cluster is TiDB v7.6.0 to v8.2.0, the upgrade target version is v8.3.0 or later, and accelerated table creation is enabled via [`tidb_enable_fast_create_table`](/system-variables.md#tidb_enable_fast_create_table-new-in-v800), you need to first disable the accelerated table creation feature, and then enable it as needed after the upgrade is completed. Otherwise, some metadata KVs added by this feature remain in the cluster. Starting from v8.3.0, this feature is optimized. Upgrading to a later TiDB version no longer generates and retains this type of metadata KVs.
> **Note:**
>
Expand Down

0 comments on commit 0b1344b

Please sign in to comment.