The Wayback Machine - https://web.archive.org/web/20201121005255/https://github.com/github/gh-ost/issues/841
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-ost with MTS #841

Open
Roguelazer opened this issue May 4, 2020 · 3 comments
Open

gh-ost with MTS #841

Roguelazer opened this issue May 4, 2020 · 3 comments

Comments

@Roguelazer
Copy link
Contributor

@Roguelazer Roguelazer commented May 4, 2020

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.

@ggunson
Copy link
Contributor

@ggunson ggunson commented May 4, 2020

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.

@Roguelazer
Copy link
Contributor Author

@Roguelazer Roguelazer commented May 4, 2020

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)?

@ggunson
Copy link
Contributor

@ggunson ggunson commented May 4, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.