Parallel replication with --log-slave-updates=0 is very slow

Description

In parallel replication, given transactions T1,T2 in the binlog, the code
needs to have T2 wait sufficiently long that T1 will commit before T2 on the
slave, preserving binlog order.

The binlog commit code is optimised to handle this wait well with respect to
performance. However, when binlog is not used on the slave, commit is handled
instead by the normal commit code in handler.cc and InnoDB, which is missing
these optimisations. This results in poor performance, to the point that
turning off the binlog when parallel replication is enabled actually
decreases the performance.

This should be improved by implementing similar wait optimisations for the
non-binlog case as for the binlog case. Possibly, all that is needed is for
InnoDB to call THD::wakeup_subsequent_commits as soon as the commit order for
the transaction has been decided.

Environment

None

Assignee

Kristian Nielsen

Reporter

Kristian Nielsen

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure