mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-4506: Parallel replication.
Fix some more parts of old-style position updates. Now we save in rgi some coordinates for master log and relay log, so that in do_update_pos() we can use the right set of coordinates with the right events. The Rotate_log_event::do_update_pos() is fixed in the parallel case to not directly update relay-log.info (as Rotate event runs directly in the driver SQL thread, ahead of actual event execution). Instead, group_master_log_file is updated as part of do_update_pos() in each event execution. In the parallel case, position updates happen in parallel without any ordering, but taking care that position is not updated backwards. Since position update happens only after event execution this leads to the right result. Also fix an access-after-free introduced in an earlier commit.
This commit is contained in:
@ -24,6 +24,9 @@ struct rpl_parallel_thread {
|
||||
Log_event *ev;
|
||||
rpl_group_info *rgi;
|
||||
ulonglong future_event_relay_log_pos;
|
||||
char event_relay_log_name[FN_REFLEN];
|
||||
char future_event_master_log_name[FN_REFLEN];
|
||||
ulonglong event_relay_log_pos;
|
||||
} *event_queue, *last_in_queue;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user