Closed Roguelazer closed 3 years ago
gh-ost is/was used with multithreaded replication at GitHub, using slave_parallel_type=LOGICAL_CLOCK
and slave_preserve_commit_order=1. Events would get committed on the replicas in the order they had on the master, and the event ordering in the replica binary logs would match the master's.
That's good to hear.
Would it be worth adding a pre-launch check that, if MTS is enabled, slave_preserve_commit_order
is set to 1 (the way gh-ost right now checks that, e.g., BINLOG_ROW_IMAGE
is set to FULL
)?
Probably a good idea. And anything else that may be relevant from https://dev.mysql.com/doc/refman/5.7/en/replication-features-transaction-inconsistencies.html
Closing this as an answered question. Feel free to open a new issue!
We use gh-ost all the time and are considering switching our 5.7+ clusters to use MTS / parallel replication in one of the LOGICAL_CLOCK modes (COMMIT_ORDER for now; maybe WRITESET_SESSION later). Has gh-ost been tested with MTS or would we need to keep around a serial replica to run migrations from? I couldn't find anything in the docs or in any other issues, but I would imagine that parallel replication would mess up the way gh-ost detects events through the
_ghc
tables since you couldn't assume any kind of synchronization barrier between reading DML on the main table and reading DML into the ghc table.