mariadb/storage
Kristian Nielsen 582a87274b 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-02 15:22:02 +02:00
..
archive Merge 10.6 into 10.11 2024-06-27 10:26:09 +03:00
blackhole Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
columnstore Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
connect Merge 10.11 into 11.4 2025-03-28 13:55:21 +02:00
csv Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
example Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
federated Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
federatedx Merge 10.11 into 11.4 2025-03-03 11:07:56 +02:00
heap Fixed costs in JOIN_TAB::estimate_scan_time() and HEAP 2025-02-10 15:59:28 +02:00
innobase MDEV-34705: Binlog-in-engine: Crash-safe slave 2025-07-02 15:22:02 +02:00
maria Merge 10.11 into 11.4 2025-03-28 13:55:21 +02:00
mroonga Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
myisam Merge 10.11 into 11.4 2025-03-28 13:55:21 +02:00
myisammrg Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
oqgraph Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
perfschema Merge branch '10.11' into 11.4 2025-01-14 23:45:41 +01:00
rocksdb MDEV-35773 fix test results 2025-01-15 09:49:33 +01:00
sequence Merge branch '10.11' into 11.1 2024-07-08 22:40:16 +02:00
sphinx Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
spider Merge 10.11 into 11.4 2025-04-02 10:15:08 +03:00
test_sql_discovery Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00