Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
To change the number of undo tablespaces, we need to reinitialize the data directory (dump + restore).
InnoDB should allow changing number of undo tablespaces as a part of restart process.
System tablespace contains InnoDB dictionary tables, doublewrite buffer, change buffer tree
and undo log pages. By allowing this change, InnoDB can reduce the workload on system tablespace.
Requirements
A prior shutdown with SET GLOBAL innodb_fast_shutdown=0 must be executed before adding the undo log tablespaces.
This is because the undo logs must be empty (no incomplete or XA PREPARE transactions, nothing to be purged) so that the old undo tablespaces can discarded and new ones created.
Steps
- Check whether the existing undo log exists. If exists then give the warnings about the slow shutdown and start the server normally.
- If not exist then free the system tablespace rollback segment header page else throw message about slow shutdown and continue the normal server start operation
- Free the system tablespace rollback segment header page of the slots 1...127
- Reset the TRX_SYS page and reinitialize the system tablespace rollback segment slot(0th slot), doublewrite information,
update the binlog info and WSREP info in system rollback segment header page (0th slot page)
Step(3) and (4) should happen within a single mini-transaction - Delete the old undo tablespaces if any
- Make checkpoint to get rid of old undo tablespace redo log records
- Read the latest MAX_SPACE_ID from dictionary header page
- Create the new specified undo log tablespace and initialize the page0 of all undo tablespaces
Step (7) and Step (8) should happen within a single mini-transaction - Make the checkpoint again to make sure that next startup or backup reads the undo log tablespaces before
opening the redo log records - Create the rollback segment for each rollback segment in a round robin fashion
Attachments
Issue Links
- blocks
-
MDEV-29986 Set innodb_undo_tablespaces=3 by default
- Closed
- causes
-
MDEV-30122 mariabackup.skip_innodb crashes when innodb_undo_tablespaces > 0
- Closed
-
MDEV-30158 InnoDB fails to start ther server 10.11 when innodb_undo_tablespaces mismatch
- Closed
-
MDEV-30311 system-wide max transaction id corrupted (from MySQL-5.7 upgrade)
- Closed
-
MDEV-32974 Member fails to join due to old seqno in GTID
- Closed
-
MDEV-34200 InnoDB tries to write to read-only system tablespace in buf_dblwr_t::init_or_load_pages()
- Closed
- is blocked by
-
MDEV-21216 InnoDB performs dirty read of TRX_SYS page before crash recovery
- Closed
- is duplicated by
-
MDEV-10373 Possibility to implement UNDO tablespace in existing intance
- Closed
-
MDEV-17555 Allow moving UNDO segments into separate UNDO tablespaces without total rebuild of the data directory from a logical backup
- Closed
- relates to
-
MDEV-27121 mariabackup incompatible with disabled dedicated undo log tablespaces
- Closed
-
MDEV-29983 Deprecate innodb_file_per_table
- Closed
-
MDEV-14481 Execute InnoDB crash recovery in the background
- Closed
-
MDEV-14795 InnoDB system tablespace cannot be shrunk
- Closed
-
MDEV-21952 ibdata1 file size growing in MariaDB
- Closed
-
MDEV-31488 Restart on backupped data fails with InnoDB: Failing assertion: !i || prev_id + 1 == space_id at srv0start.cc line 803
- Closed