Hi Kristian, On Wed, Feb 28, 2024 at 2:27 PM Kristian Nielsen <knielsen@knielsen-hq.org> wrote:
If we write the last modification LSN to the first page of the binlog tablespace, recovery can simply skip all log records for the binlog tablespace that are older than the LSN.
Ah! Yes, I see, that seems a good solution. And users will want to have binlog data written to the file as quickly as possible anyway, to be visible with external tools (mariadb-binlog), so that fits perfectly.
I realized later that we might as well write the LSN at the time of the file creation. That would remove the need to make the first page of the binlog file dirty whenever anything in the file is being modified. File creation may have to durably write the first page for this scheme to work. For normal .ibd file creation, this kind of a step was removed in https://jira.mariadb.org/browse/MDEV-24626. Marko -- Marko Mäkelä, Lead Developer InnoDB MariaDB plc