mariadb/mysql-test/suite/binlog_in_engine
Kristian Nielsen b9cf2f5eb5 MDEV-34705: Binlog-in-engine: Crash-safe slave
This patch makes replication crash-safe with the new binlog implementation,
even when --innodb-flush-log-at-trx-commit=0|2. The point is to not send any
binlog events to the slave until they have become durable on master, thus
avoiding that a slave may replicate a transaction that is lost during master
recovery, diverging the slave from the master.

Keep track of which point in the binlog has been durably synced to disk
(meaning the corresponding LSN has been durably synced to disk in the InnoDB
redo log). Each write to the binlog inserts an entry with offset and
corresponding LSN in a FIFO. Dump threads will first read only up to the
durable point in the binlog. A dump thread will then check the LSN fifo, and
do an InnoDB redo log sync if anything is pending. Then the FIFO is emptied
of any LSNs that have now become durable, and the durable point in the
binlog is updated and reading the binlog can continue.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-07-03 14:44:52 +02:00
..
include MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
binlog_flush_purge.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_flush_purge.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_in_engine.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_in_engine.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_in_engine2.result MDEV-34705: Binlog-in-engine: No use of InnoDB tablespace and bufferpool 2025-04-06 10:01:50 +02:00
binlog_in_engine2.test MDEV-34705: Binlog-in-engine: Implement RESET MASTER 2025-04-06 10:01:50 +02:00
binlog_in_engine_restart.opt MDEV-34705: Binlog-in-engine: Configurable binlog directory 2025-04-06 10:01:50 +02:00
binlog_in_engine_restart.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_in_engine_restart.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_legacy_pos.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
binlog_legacy_pos.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
crash_safe_slave-master.opt MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
crash_safe_slave.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
crash_safe_slave.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
mariabackup_slave_provision_binlog_dir.cnf MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
mariabackup_slave_provision_binlog_dir.result MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
mariabackup_slave_provision_binlog_dir.test MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
mariabackup_slave_provision_nolock.cnf MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
mariabackup_slave_provision_nolock.result MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
mariabackup_slave_provision_nolock.test MDEV-34705: Binlog-in-engine: mariadb-backup integration 2025-04-25 15:28:32 +02:00
my.cnf MDEV-34705: Binlog-in-engine: Fix race between reader and flush 2025-04-07 08:47:46 +02:00
not_implemented_yet.result MDEV-34705: Binlog-in-engine: Integration with server-layer code 2025-04-10 19:16:55 +02:00
not_implemented_yet.test MDEV-34705: Binlog-in-engine: Integration with server-layer code 2025-04-10 19:16:55 +02:00
purge_dump_thread-master.opt MDEV-34705: Binlog-in-engine: Implement refcounting outstanding OOB records 2025-04-19 12:26:28 +02:00
purge_dump_thread.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
purge_dump_thread.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
recovery.opt MDEV-34705: Binlog-in-engine: Recovery intermediate commit 2025-04-06 10:01:51 +02:00
recovery.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
recovery.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
recovery_large.opt MDEV-34705: Binlog-in-engine: Recovery testcase + few bugfixes 2025-04-06 10:01:51 +02:00
recovery_large.result MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
recovery_large.test MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-03 14:44:52 +02:00
rpl_gtid_index-master.opt MDEV-34705: Binlog-in-engine: Configurable binlog directory 2025-04-06 10:01:50 +02:00
rpl_gtid_index-slave.opt MDEV-34705: Binlog-in-engine: Configurable binlog directory 2025-04-06 10:01:50 +02:00
rpl_gtid_index.result MDEV-34705: Binlog-in-engine: Working replication to slave 2025-04-06 10:00:17 +02:00
rpl_gtid_index.test MDEV-34705: Binlog-in-engine: Working replication to slave 2025-04-06 10:00:17 +02:00
rpl_oob.result MDEV-34705: Binlog-in-engine: Fix hang with event group of specific size 2025-07-03 14:44:51 +02:00
rpl_oob.test MDEV-34705: Binlog-in-engine: Fix hang with event group of specific size 2025-07-03 14:44:51 +02:00