Skip to content

Commit 31e5846

Browse files
Update doc after the comments
1 parent 005192b commit 31e5846

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

docs/limitations.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
11
# MyRocks limitations
22

3-
The MyRocks storage engine lacks the following features compared to InnoDB:
3+
Compared to InnoDB, the MyRocks storage engine lacks the following features:
44

5-
* [Online DDL](https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl.html) is generally **not supported** due to the lack of atomic DDL support.
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. disruptive compared to InnoDB.
66

7-
As of Percona Server for MySQL 8.0.42-33, RocksDB supports a limited set of Instant DDL operations through specific configuration variables:
7+
* `Traditional MyRocks DDL behavior`
88

9-
* [`--rocksdb_enable_instant_ddl_for_append_column`](variables.md#rocksdb_enable_instant_ddl_for_append_column)
10-
* [`--rocksdb_enable_instant_ddl_for_column_default_changes`](variables.md#rocksdb_enable_instant_ddl_for_column_default_changes)
11-
* [`--rocksdb_enable_instant_ddl_for_drop_index_changes`](variables.md#rocksdb_enable_instant_ddl_for_drop_index_changes)
12-
* [`--rocksdb_enable_instant_ddl_for_table_comment_changes`](variables.md#rocksdb_enable_instant_ddl_for_table_comment_changes)
9+
| Operation type | Examples | ALGORITHM |
10+
|---------------------|--------------------------------------------------|-----------------------------|
11+
| Index operations | `ADD INDEX`, `DROP INDEX`, `RENAME INDEX` | `INPLACE` (always) |
12+
| Column changes | `ADD COLUMN`, `DROP COLUMN`, `MODIFY COLUMN` | `COPY` (full table rebuild) |
13+
| Metadata changes | `RENAME TABLE`, some `RENAME COLUMN` operations | May be `INSTANT` |
1314

14-
However, RocksDB has important limitations compared to InnoDB's Instant DDL support.
15-
16-
* The explicit `ALTER TABLE ... ALGORITHM=INSTANT` syntax is not supported for RocksDB tables.
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.
1716

18-
* As of Percona Server for MySQL 8.0.25-15, certain partition management operations support the `INPLACE` algorithm. For example, dropping a partition can now be performed without a full table rebuild.
17+
* As of `Percona Server for MySQL 8.0.25-15`, MyRocks supports `INPLACE` partition management for certain operations:
1918

2019
```sql
21-
ALTER TABLE t1 ALGORITHM=INPLACE, DROP PARTITION p2;
20+
ALTER TABLE t1 DROP PARTITION p1, ALGORITHM=INPLACE;
21+
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (MAXVALUE)), ALGORITHM=INPLACE;
2222
```
23-
However, not all partition operations support `INPLACE`. Operations that modify the partitioning scheme, such as changing `PARTITION ... VALUES`, still require the `COPY` algorithm. In these cases, the table is rebuilt, and data is redistributed according to the new partition definition.
23+
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.
24+
25+
**Note:** Dropping a partition permanently deletes any data stored in it unless that data is reassigned to another partition.
26+
27+
28+
* 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.
29+
30+
To enable specific types of instant operations, use the following configuration options:
31+
32+
| Configuration variable | Enables Instant DDL for | ALGORITHM (internal only) |
33+
|------------------------|--------------------------|----------------------------|
34+
| [`rocksdb_enable_instant_ddl_for_append_column=ON`](variables.md#rocksdb_enable_instant_ddl_for_append_column) | `ALTER TABLE ... ADD COLUMN` | `INSTANT` |
35+
| [`rocksdb_enable_instant_ddl_for_column_default_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_column_default_changes) | `ALTER/MODIFY COLUMN … DEFAULT` | `INSTANT` |
36+
| [`rocksdb_enable_instant_ddl_for_drop_index_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_drop_index_changes) | `ALTER TABLE ... DROP INDEX` | `INSTANT` |
37+
| [`rocksdb_enable_instant_ddl_for_table_comment_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_table_comment_changes) | `ALTER TABLE ... COMMENT` | `INSTANT` |
2438

25-
Note that if you use `DROP PARTITION` without reassigning data to another partition, any data contained in the dropped partition will be permanently deleted.
39+
**Note:** MyRocks does **not support `ALGORITHM=INSTANT`** in SQL syntax. These operations behave like Instant DDL **internally**, but only if the respective configuration variables are enabled.
2640

2741
* [ALTER TABLE .. EXCHANGE PARTITION](https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html).
2842

0 commit comments

Comments
 (0)