mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
2c2478b822
Before, the arrival of same GTID twice in multi-source replication would cause double-apply or in gtid strict mode an error. Keep the behaviour, but add an option --gtid-ignore-duplicates which allows to correctly handle duplicates, ignoring all but the first. This relies on the user ensuring correct configuration so that sequence numbers are strictly increasing within each replication domain; then duplicates can be detected simply by comparing the sequence numbers against what is already applied. Only one master connection (but possibly multiple parallel worker threads within that connection) is allowed to apply events within one replication domain at a time; any other connection that receives a GTID in the same domain either discards it (if it is already applied) or waits for the other connection to not have any events to apply. Intermediate patch, as proof-of-concept for testing. The main limitation is that currently it is only implemented for parallel replication, @@slave_parallel_threads > 0.
24 lines
315 B
INI
24 lines
315 B
INI
!include my.cnf
|
|
|
|
[mysqld.1]
|
|
log-slave-updates
|
|
loose-innodb
|
|
|
|
[mysqld.2]
|
|
log-slave-updates
|
|
loose-innodb
|
|
|
|
[mysqld.3]
|
|
log-bin=server3-bin
|
|
log-slave-updates
|
|
loose-innodb
|
|
|
|
[mysqld.4]
|
|
server-id=4
|
|
log-bin=server4-bin
|
|
log-slave-updates
|
|
loose-innodb
|
|
|
|
[ENV]
|
|
SERVER_MYPORT_4= @mysqld.4.port
|
|
SERVER_MYSOCK_4= @mysqld.4.socket
|