[MDEV-12750] Fix crash recovery of key rotation Created: 2017-05-09  Updated: 2017-05-09  Due: 2017-05-09  Resolved: 2017-05-09

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

Type: Bug Priority: Critical
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: 10.2-ga, backup, encryption, recovery, xtrabackup

Issue Links:
Relates
relates to MDEV-12253 Buffer pool blocks are accessed after... Closed
relates to MDEV-12699 Improve crash recovery of corrupted d... Closed

 Description   

When MySQL 5.7.9 was merged to MariaDB 10.2.2, an important debug assertion was omitted from mlog_write_initial_log_record_low().

Some MariaDB encryption code is violating the contract that was changed by WL#7142: any mini-transaction that is going to modify a persistent tablespace must first register that tablespace by calling mtr_t::set_named_space(). Because the debug assertion on mtr_t::is_named_space() had been removed, the problem could only manifest itself by random failures of encryption crash recovery.

This started to occur more after the merge of MDEV-12253 from 10.1. The test encryption.innodb-redo-badkey was randomly emitting serious error messages on recovery:

2017-05-09 16:51:33 140058457458560 [ERROR] InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 1

The proper fix is to replace the missing debug assertion, to remove the improper suppressions of warnings, and to add the missing mtr_t::set_named_space() calls.



 Comments   
Comment by Marko Mäkelä [ 2017-05-09 ]

bb-10.2-marko

Comment by Jan Lindström (Inactive) [ 2017-05-09 ]

ok to push.

Generated at Thu Feb 08 08:00:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.