mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-5189: Incorrect parallel apply in parallel replication
Two problems were fixed: 1. When not in GTID mode (master_use_gtid=no), then we must not apply events in different domains in parallel (in non-GTID mode we are not capable of restarting at different points in different domains). 2. When transactions B and C group commit together, but after and separate from A, we can apply B and C in parallel, but both B and C must not start until A has committed. Fix sub_id to be globally increasing (not just per-domain increasing) so that this wait (which is based on sub_id) can be done correctly.
This commit is contained in:
@@ -657,8 +657,10 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
|
||||
if (typ == GTID_EVENT)
|
||||
{
|
||||
Gtid_log_event *gtid_ev= static_cast<Gtid_log_event *>(ev);
|
||||
uint32 domain_id= (rli->mi->using_gtid == Master_info::USE_GTID_NO ?
|
||||
0 : gtid_ev->domain_id);
|
||||
|
||||
if (!(e= find(gtid_ev->domain_id)) ||
|
||||
if (!(e= find(domain_id)) ||
|
||||
!(rgi= new rpl_group_info(rli)) ||
|
||||
event_group_new_gtid(rgi, gtid_ev))
|
||||
{
|
||||
|
Reference in New Issue
Block a user