Skip to content

Commit 1712174

Browse files
PS-10085 Update the online DDL limitations (8.0) (#592)
* Update the online DDL limitations modified: docs/glossary.md modified: docs/limitations.md * Update limitations.md
1 parent 09674d3 commit 1712174

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

docs/glossary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ A pair of keys used for cryptographic purposes, consisting of a private key and
1212

1313
Atomicity means that database operations are applied following a “all or nothing” rule. A transaction is either fully applied or not at all.
1414

15+
## Atomic DDL (Data Definition Language)
16+
17+
Atomic DDL refers to the concept where DDL operations such as `CREATE`, `ALTER`, `DROP`, or `RENAME` statements are executed in a way that ensures atomicity, meaning they either fully succeed or have no effect at all.
18+
19+
This means that if a DDL statement fails, the database automatically rolls back any partial changes, leaving the schema in a consistent state.
20+
1521
## Consistency
1622

1723
Consistency means that each transaction that modifies the database takes it from one consistent state to another.

docs/limitations.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Online DDL limitations
44

5-
MyRocks has limited support for [Online DDL operations](https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl.html) due to the lack of atomic DDL. As a result the schema changes are more restricted compared to InnoDB.
5+
MyRocks has limited support for [Online DDL operations](https://dev.mysql.com/doc/refman/{{vers}}/en/innodb-online-ddl.html) due to the lack of [atomic DDL](./glossary.md#atomic-ddl-data-definition-language). As a result the schema changes are more restricted compared to InnoDB.
66

77
### Traditional MyRocks DDL behavior
88

@@ -12,7 +12,7 @@ MyRocks has limited support for [Online DDL operations](https://dev.mysql.com/do
1212
| Column changes | `ADD COLUMN`, `DROP COLUMN`, `MODIFY COLUMN` | `COPY` (full table rebuild) |
1313
| Metadata changes | `RENAME TABLE`, some `RENAME COLUMN` operations | May be `INSTANT` |
1414

15-
**Note:** MyRocks does not support atomic DDL. Even metadata-only operations may require a full table rebuild, depending on the nature of the change.
15+
**Note:** MyRocks does not support [atomic DDL](./glossary.md#atomic-ddl-data-definition-language). Even metadata-only operations may require a full table rebuild, depending on the nature of the change.
1616

1717
### Partition management support
1818

@@ -22,27 +22,26 @@ As of `Percona Server for MySQL 8.0.25-15`, MyRocks supports `INPLACE` partition
2222
ALTER TABLE t1 DROP PARTITION p1, ALGORITHM=INPLACE;
2323
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (MAXVALUE)), ALGORITHM=INPLACE;
2424
```
25-
The aforementioned operations no longer require a full table rebuild. However, operations that modify partitioning schemes, such as changing `VALUES LESS THAN`, still fall back to the `COPY` algorithm.
25+
These operations no longer require a full table rebuild. However, operations that modify partitioning schemes, such as changing `VALUES LESS THAN`, still fall back to the `COPY` algorithm.
2626

2727
**Note:** Dropping a partition permanently deletes any data stored in it unless that data is reassigned to another partition.
2828

2929
### Instant DDL support
3030

31-
As of `Percona Server for MySQL 8.0.42-33`, MyRocks introduces limited support for Instant DDL, which is disabled by default and controlled via configuration variables.
31+
As of `Percona Server for MySQL 8.0.42-33`, MyRocks provides limited InstantDDL support that is disabled by default, and you can activate the specific instant operations you need by setting the appropriate configuration variables.
3232

33-
To enable specific types of instant operations, use the following configuration options:
33+
| Configuration variable | Enables Instant DDL for |
34+
|------------------------|--------------------------|
35+
| [`rocksdb_enable_instant_ddl_for_append_column=ON`](variables.md#rocksdb_enable_instant_ddl_for_append_column) | `ALTER TABLE ... ADD COLUMN` |
36+
| [`rocksdb_enable_instant_ddl_for_column_default_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_column_default_changes) | `ALTER/MODIFY COLUMN … DEFAULT` |
37+
| [`rocksdb_enable_instant_ddl_for_drop_index_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_drop_index_changes) | `ALTER TABLE ... DROP INDEX` |
38+
| [`rocksdb_enable_instant_ddl_for_table_comment_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_table_comment_changes) | `ALTER TABLE ... COMMENT` |
3439

35-
| Configuration variable | Enables Instant DDL for | ALGORITHM required |
36-
|------------------------|--------------------------|----------------------------|
37-
| [`rocksdb_enable_instant_ddl_for_append_column=ON`](variables.md#rocksdb_enable_instant_ddl_for_append_column) | `ALTER TABLE ... ADD COLUMN` | `ALGORITHM=INSTANT` |
38-
| [`rocksdb_enable_instant_ddl_for_column_default_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_column_default_changes) | `ALTER/MODIFY COLUMN … DEFAULT` | `ALGORITHM=INSTANT` |
39-
| [`rocksdb_enable_instant_ddl_for_drop_index_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_drop_index_changes) | `ALTER TABLE ... DROP INDEX` | `ALGORITHM=INSTANT` |
40-
| [`rocksdb_enable_instant_ddl_for_table_comment_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_table_comment_changes) | `ALTER TABLE ... COMMENT` | `ALGORITHM=INSTANT` |
40+
**Note:** Instant DDL in MyRocks is applied only when **both** of the following conditions are met:
4141

42-
**Note:** Instant DDL in MyRocks is only triggered when **both** of the following conditions are met:
42+
* The configuration variable is set to `ON`.
4343

44-
1. The configuration variable is set to `ON`,
45-
2. The `ALTER TABLE` statement explicitly includes `ALGORITHM=INSTANT`.
44+
* The `ALTER TABLE` statement explicitly includes `ALGORITHM=INSTANT`.
4645

4746
For example:
4847

@@ -51,9 +50,11 @@ SET GLOBAL rocksdb_enable_instant_ddl_for_table_comment_changes = ON;
5150
ALTER TABLE my_table COMMENT = 'New comment', ALGORITHM=INSTANT;
5251
```
5352

54-
If the configuration variable is enabled (`ON`) but `ALGORITHM=INSTANT` is not specified, MyRocks will fall back to the default algorithm.
53+
If either condition is missing:
5554

56-
Conversely, if the configuration variable is disabled (`OFF`), attempting to use `ALGORITHM=INSTANT` will result in an error.
55+
* When the variable is `ON` but `ALGORITHM=INSTANT` is omitted, MyRocks falls back to the default (non‑instant) algorithm.
56+
57+
* When the variable is `OFF`, any `ALTER TABLE … ALGORITHM=INSTANT` statement fails with an error.
5758

5859
## Unsupported InnoDB features in MyRocks
5960

0 commit comments

Comments
 (0)