mariadb/mysql-test/suite
Brandon Nesterenko eb4458e993 MDEV-33465: an option to enable semisync recovery
The current semi-sync binlog fail-over recovery process uses
rpl_semi_sync_slave_enabled==TRUE as its condition to truncate a
primary server’s binlog, as it is anticipating the server to re-join
a replication topology as a replica. However, for servers configured
with both rpl_semi_sync_master_enabled=1 and
rpl_semi_sync_slave_enabled=1, if a primary is just re-started (i.e.
retaining its role as master), it can truncate its binlog to drop
transactions which its replica(s) has already received and executed.
If this happens, when the replica reconnects, its gtid_slave_pos can
be ahead of the recovered primary’s gtid_binlog_pos, resulting in an
error state where the replica’s state is ahead of the primary’s.

This patch changes the condition for semi-sync recovery to truncate
the binlog to instead use the configuration variable
--init-rpl-role, when set to SLAVE. This allows for both
rpl_semi_sync_master_enabled and rpl_semi_sync_slave_enabled to be
set for a primary that is restarted, and no transactions will be
lost, so long as --init-rpl-role is not set to SLAVE.

Reviewed By:
============
Sergei Golubchik <serg@mariadb.com>
2024-07-05 19:53:57 -06:00
..
archive Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
atomic
binlog MDEV-33465: an option to enable semisync recovery 2024-07-05 19:53:57 -06:00
binlog_encryption Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
client
compat Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
csv Backporting bugs fixes fixed by MDEV-31340 from 11.5 2024-05-21 14:58:01 +04:00
encryption Merge branch '10.5' into 10.6 2024-07-03 13:27:23 +02:00
engines
federated Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
funcs_1 Merge 10.5 into 10.6 2024-06-07 10:03:51 +03:00
funcs_2
galera MDEV-33064: Sync trx->wsrep state from THD on trx start 2024-07-01 13:07:39 +02:00
galera_3nodes Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
galera_3nodes_sr Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
galera_sr Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
gcol Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
handler
heap
innodb Merge branch '10.5' into 10.6 2024-07-03 13:27:23 +02:00
innodb_fts Merge 10.5 into 10.6 2024-06-07 10:03:51 +03:00
innodb_gis Merge branch '10.5' into 10.6 2024-07-03 13:27:23 +02:00
innodb_i_s
innodb_zip Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
jp
json Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
large_tests fix failing large_tests.maria_recover_encrypted 2024-04-22 17:22:11 +02:00
maria Merge 10.5 into 10.6 2024-06-07 10:03:51 +03:00
mariabackup Merge 10.5 into 10.6 2024-05-30 14:27:07 +03:00
mtr/t
mtr2
multi_source
optimizer_unfixed_bugs
parts Merge 10.5 into 10.6 2024-05-30 14:27:07 +03:00
perfschema Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
perfschema_stress
period
plugins
roles Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
rpl MDEV-33465: an option to enable semisync recovery 2024-07-05 19:53:57 -06:00
s3 Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
sql_sequence Merge 10.5 into 10.6 2024-06-17 08:40:07 +03:00
storage_engine
stress
sys_vars Merge branch '10.5' into 10.6 2024-07-03 13:27:23 +02:00
sysschema
unit
vcol Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
versioning
wsrep