Status: Closed (View Workflow)
This was found together with
MDEV-7888, but it is a logically different bug,
so filing separately.
The parallel replication worker threads can hang in some cases with
non-transactional event groups. The symptom is that worker threads are stuck
in "waiting for prior transaction to start commit".
The problem is when record_gtid() runs at the end of the non-transactional
update. Then it needs to create its own transaction to update the
mysql.gtid_slave_pos table. This causes ha_commit_trans() to call
wakeup_subsequent_commits(). But this is wrong, it is too early.
The hang then occurs because a following transaction things the prior
non-transactional event group is already done - so it deallocates the
corresponding group_commit_orderer object. Then a following worker thread does
not get its wakeup, and the slave gets stuck.
- relates to
MDEV-7888 ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang