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

ddl: refine descriptions about online DDL #20153

Merged
merged 4 commits into from
Feb 5, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ddl-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ TiDB uses an online and asynchronous approach to execute DDL statements. This me

### Types of DDL statements

Based on whether DDL statements block the user application during execution, DDL statements can be divided into the following types:
TiDB supports Online DDL, which means that when a DDL statement is executed in the database, a specific method is used to ensure that the statement does not block the user application. You can continue to submit data modifications during the execution of DDL, and the database guarantees data consistency and correctness.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

- **Offline DDL statements**: When the database receives a DDL statement from the user, it first locks the database object to be modified and then changes the metadata. During the DDL execution, the database blocks the user application from modifying data.

- **Online DDL statements**: When a DDL statement is executed in the database, a specific method is used to ensure that the statement does not block the user application. This allows the user to submit modifications during the DDL execution. The method also ensures the correctness and consistency of the corresponding database object during the execution process.
By contrast, traditional Offline DDL locks database objects and blocks user modifications until the DDL operation is completed. TiDB does not support Offline DDL.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

Based on whether to operate the data included in the target DDL object, DDL statements can be divided into the following types:

Expand Down