Parallel replication

Nice story Oli, good to hear that enabling parallel replication was able to help quickly catch-up the 5 days lag.

Yes, it is often the case that a high number of threads can be beneficial. This is because transactions often need to wait for each other to ensure correct commit order and data consistency. And until we get a thread pool mechanism in parallel replication, waiting transaction equals waiting threads, unfortunately.

Interesting with the foreign key violation reports from InnoDB. This is probably just normal temporary errors caused by the optimistic apply in parallel of transactions that end up conflicting (eg. insert in child table runs before insert in parent). Such errors are silently handled on the server layer to roll back and retry the offending transaction. But maybe these should also be silenced in the InnoDB status information to not cause confusion (when the foreign key error is temporary and automatically handled by the parallel replication)?

tags: