mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0
The problem occured when using parallel replication, and an error occured that caused the SQL thread to stop when the IO thread had already reached a following binlog file from the master (or otherwise performed a relay log rotation). In this case, the Rotate Event at the end of the relay log file could still be executed, even though an earlier event in that relay log file had gotten an error. This would cause the position to be incorrectly updated, so that upon restart of the SQL thread, the event that had failed would be silently skipped and ignored, causing replication corruption. Fixed by checking before executing Rotate Event, whether an earlier event has failed. If so, the Rotate Event is not executed, just dequeued, same as for other normal events following a failing event.
This commit is contained in:
@ -72,7 +72,15 @@ struct rpl_parallel_thread {
|
||||
rpl_parallel_entry *current_entry;
|
||||
struct queued_event {
|
||||
queued_event *next;
|
||||
Log_event *ev;
|
||||
/*
|
||||
queued_event can hold either an event to be executed, or just a binlog
|
||||
position to be updated without any associated event.
|
||||
*/
|
||||
enum queued_event_t { QUEUED_EVENT, QUEUED_POS_UPDATE } typ;
|
||||
union {
|
||||
Log_event *ev; /* QUEUED_EVENT */
|
||||
rpl_parallel_entry *entry_for_queued; /* QUEUED_POS_UPDATE */
|
||||
};
|
||||
rpl_group_info *rgi;
|
||||
inuse_relaylog *ir;
|
||||
ulonglong future_event_relay_log_pos;
|
||||
|
Reference in New Issue
Block a user