On Dec 11, 2007, at 11:29 AM, Matt Shields wrote:
On Dec 11, 2007 1:39 PM, J. Potter jpotter-centos@codepuppy.com wrote:
... But I saw a presentation at the Boston MySQL Meetup.com group about how to do master-master in mysql 5. We're about to implement this in the next few weeks. ...
I've run into issues with crash recovery in master-master mode:
master A is at position X
master B, replicating from A, gets to position X
master A syncs to its filesystem that it's at position X
master A receives some inserts, and is now at position Y
master B, replicating from A, gets to position Y
master A crashes before the position gets synced to filesystem
master A gets rebooted, recovers from innodb log, but has itself
only marked at position X
- master B requests position Y from master A, but that position
doesn't exist yet, so replication breaks.
Perhaps someone here knows the proper recovery procedure at this point?
If this were master-slave, I'd probably do an LVM Snapshot and get a fresh copy of the master db. The same could be done for master-master.
The problem is you'll have some inconsistency between your master A's view of the database and the master B's view. You lose any changes to the data on master B. It would be nice to be able to merge any changes from B that hadn't made their way to master A yet. At that point you're examining binlogs.
Ryan
-- Ryan Ordway E-mail: rordway@oregonstate.edu Unix Systems Administrator rordway@library.oregonstate.edu OSU Libraries, Corvallis, OR 97331 Office: Valley Library #4657