![]() The length of each record is explicitly tagged and the payload will be followed by CRC-32C. A checkpoint record will comprise an LSN and a byte offset in a separate, optionally encrypted, circular log file ib_logdata. ib_logfile0 (after the 512-byte header) will be append-only, unencrypted, for records containing file names and checkpoint information.To address the fil_system.mutex contention whose root cause was later fixed in MDEV-23855, we were considering to split the log as follows: ![]() We had some ideas to move to an append-only file and to partition the log into multiple files, but it turned out that a single fixed-size circular log file would perform best in typical scenarios. (It can copy data file pages without encrypting them.) Mariabackup cannot copy the log without having access to the encryption keys.We were holding an exclusive latch while copying log blocks this was fixed in MDEV-27774.We are holding a mutex while zero-filling unused parts of log blocks, encrypting log blocks, or computing checksums.Log records are divided into tiny blocks of 512 bytes, with 12+4 bytes of header and footer (12+8 bytes with MDEV-12041 innodb_encrypt_log (10.4.0)).( MDEV-20907 in MariaDB Server 10.5.0 change the default to 1 file, and later the parameter was deprecated and ignored.) The log file was unnecessarily split into multiple files, logically treated as one big circular file.Edit: The contention on fil_system.mutex was practically removed in MDEV-23855, and the contention on log_sys.mutex due to this is minimal. The bookkeeping causes some contention on log_sys.mutex and fil_system.mutex. File names that were first changed since the latest checkpoint must be appended to the log.On log checkpoint, some file name information needs to be appended to the log.The rest of the log file is written in a circular fashion. At the start of ib_logfile0, there are two log checkpoint blocks, only 1024 bytes apart, while there exist devices with 4096-byte block size.The InnoDB redo log format is not optimal in many respects:
0 Comments
Leave a Reply. |