Introduction
Online DDL is a new feature in MariaDB 10.0. Online DDL is processed through below 4 tasks in sequence.
- InnoDB::ha_prepare_inplace_alter_table(..)
- InnoDB::ha_inplace_alter_table(..)
- InnoDB::ha_commit_inplace_alter_table(..)
- mysql_rename_table(..)
InnoDB storage engine allocates temporal memory buffer for transaction logging in phase 1 where row changes during this phase are logged. Size of this buffer is at start sort_buffer_size and it can be grown up to innodb_online_alter_log_max size. During phase 2 thread processing the ALTER statement will copy old table’s rows to a new altered table. After this MariaDB will take exclusive lock for target table and applies row log buffer to the new altered table.
This introduces a new unpredictable failure case row log buffer overflow. MariaDB server will rollback ALTER statement if row log buffer …
[Read more]