-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Question: why are master/master configs unsupported? #144
Comments
The tool allows master-master if executed with
The reason this flag is required is that gh-ost cannot confirm your master-master setup is an active-passive one. For all it knows it may be an active-active one, where both masters accept writes to the migrated table, in which case it cannot reliably determine all changes are propagated to the ghost table upon cutover phase. If you know for sure your setup is active-passive, you should be on safe grounds. |
Excellent, thanks! Possibly worth adding to the help or a doc file for future curious folks? James Brown,
|
What if we have an active-active multimaster topology? Does it mean we can't use this tool? |
@thedrow I need to wrap my head around this some more; right now I will update the docs to indicate active-active is not supported. Whether it would actually work or not is what I'll be thinking of. I've worked a lot with active-active setups and there was such a variety of corner cases that I'm afraid to be missing something. |
See #148 |
Need to fix error message to indicate |
So, one weird thing with passive/active master/master configs is that gh-ost finds the master that's "furthest" away from the current replica, which means that it sometimes applies changes to the passive side of the master/master pair. It would be nice to either (a) be able to specify Thoughts? |
That is to say, given the following configuration: Where only (A) is writable, if gh-ost is invoked on (D) or (E), it will attempt to do the migration on (C). This proceeds if the user has SUPER (since SUPER users can override Obviously there are other issues with this kind of setup, but it seems plausible to either look at |
@Roguelazer I've similarly found the same. A simple solution would be: if master-master, then force user to specify active master. Operationally though, I'm not sure this is easy on the user. Sometimes the user herself is unaware who the active master is as it is obscured by virtual IP.
Detecting Lastly, I really want to wrap my head around whether active-active is valid. It may actually be valid -- I'm unsure as yet but a few scenarios I ran in my mind seem fine. |
I do actually like being able to run on a replica instead of the master, though, so it would be kind of a bummer if the only supported configuration for The biggest problem with active-active seems the be the lock to flip the tables. You'd need to get a lock on both masters before you could safely do the swap, right? |
The one problem I'm positive of right now is that of:
such that R1 is the replica, M1 is the master Placing a lock on both masters -- sounds feasible. I'm going to spend some time thinking about this. |
The tool bails out if a master-master pair is detected anywhere in the replication hierarchy (even if it's in a different branch), but I'm not actually sure why? I can see why it might cause issues with
--test-on-replica
(if the replica were a member of the master/master pair), but are there any other issues to be aware of? Given a topology like the following:Is there any danger running
gh-ost
pointed to one of R1/R2/R3?The text was updated successfully, but these errors were encountered: