mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-8113: Parallel slave: slave hangs on ALTER TABLE (or other DDL) as the first event after slave start
In optimistic parallel replication, it is not safe to try to run a following transaction in parallel with a DDL statement, and there is code to prevent this. However, the code was missing the case where the DDL is the very first event after slave start. In this case, following transactions could run in parallel with the DDL, which can cause the slave to hang or even corrupt slave in unlucky cases.
This commit is contained in:
@@ -2299,6 +2299,11 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
||||
}
|
||||
gco->flags= flags;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gtid_flags & Gtid_log_event::FL_DDL)
|
||||
force_switch_flag= group_commit_orderer::FORCE_SWITCH;
|
||||
}
|
||||
rgi->speculation= speculation;
|
||||
|
||||
if (gtid_flags & Gtid_log_event::FL_GROUP_COMMIT_ID)
|
||||
|
Reference in New Issue
Block a user