[MDEV-5802] Parallel replication with --log-slave-updates=0 is very slow Created: 2014-03-06  Updated: 2014-11-26  Resolved: 2014-11-26

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.8
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None


 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.



 Comments   
Comment by Kristian Nielsen [ 2014-11-26 ]

InnoDB/XtraDB now calls wakeup_subsequent_commits after "fast" part of commit, in the case where binlogging is not done (this was done some time ago).

Hopefully this fixes the problem. If benchmarks later show that things are still slower than expected, we can re-open this.

Generated at Thu Feb 08 07:07:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.