[MDEV-12289] Keep 128 persistent rollback segments for compatibility and performance Created: 2017-03-17  Updated: 2022-09-05  Resolved: 2017-03-31

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.2
Fix Version/s: 10.2.5

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: 10.2-ga, compat56, performance, portability

Issue Links:
Duplicate
is duplicated by MDEV-12388 InnoDB: Failing assertion: rollback i... Closed
Problem/Incident
causes MDEV-16017 galera mtr tests fail with sst_xtraba... Closed
causes MDEV-17851 Assertion failure srv_undo_tablespace... Closed
Relates
relates to MDEV-13013 InnoDB unnecessarily extends data files Closed
relates to MDEV-23382 Change DB_ROLL_PTR format to allow mo... Open
relates to MDEV-13082 Upgrade Instructions 10.1 to 10.2 Res... Closed
relates to MDEV-13269 Upgrade tests for InnoDB undo log Closed
relates to MDEV-15453 IST failed during upgrade of version ... Closed
relates to MDEV-15522 Change galera suite MTR tests to use ... Closed
relates to MDEV-17304 Replace use of XtraBackup with MariaD... Closed
relates to MDEV-19136 mysql_upgrade from mysql 5.7 to Maria... Closed

 Description   

InnoDB divides the allocation of undo logs into rollback segments. The DB_ROLL_PTR system column of clustered indexes can address up to 128 rollback segments. Originally, InnoDB only created one rollback segment. In MySQL 5.5 or in the InnoDB Plugin for MySQL 5.1, all 128 rollback segments were created.

MySQL 5.7 hard-codes the rollback segment IDs 1..32 for temporary undo logs. On upgrade, unless a slow shutdown (innodb_fast_shutdown=0) was performed on the old server instance, these rollback segments could be in use by transactions that are in XA PREPARE state or transactions that were left behind by a server kill followed by a normal shutdown immediately after restart.

Persistent tables cannot refer to temporary undo logs or vice versa. Therefore, we should keep two distinct sets of rollback segments: one for persistent tables and another for temporary tables. In this way, all 128 rollback segments will be available for persistent transactions, which could improve performance. Also, MariaDB 10.2 would remain more compatible than MySQL 5.7 with data files from earlier versions of MySQL or MariaDB.



 Comments   
Comment by Marko Mäkelä [ 2017-03-30 ]

bb-10.2-marko

Comment by Jan Lindström (Inactive) [ 2017-03-31 ]

My comments are minor so ok to push.

Generated at Thu Feb 08 07:56:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.