mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-5804: If same GTID is received on multiple master connections in multi-source replication, the event is double-executed causing corruption or replication failure
Some fixes, mainly to make it work in non-parallel replication mode also (--slave-parallel-threads=0). Patch should be fairly complete now.
This commit is contained in:
@@ -425,10 +425,22 @@ handle_rpl_parallel_thread(void *arg)
|
||||
{
|
||||
int res=
|
||||
rpl_global_gtid_slave_state.check_duplicate_gtid(&rgi->current_gtid,
|
||||
rgi->rli);
|
||||
/* ToDo: Handle res==-1 error. */
|
||||
if (!res)
|
||||
rgi);
|
||||
if (res < 0)
|
||||
{
|
||||
/* Error. */
|
||||
slave_output_error_info(rgi->rli, thd);
|
||||
signal_error_to_sql_driver_thread(thd, rgi);
|
||||
}
|
||||
else if (!res)
|
||||
{
|
||||
/* GTID already applied by another master connection, skip. */
|
||||
skip_event_group= true;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We have to apply the event. */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user