MySQL Forums
Forum List  »  Utilities

Re: DRBD with non-Innodb engine
Posted by: Michael Maraist
Date: January 30, 2008 04:34PM

I think the issue has to do with table corruption. In MyISAM if the server crashes, I don't recall if automatic consistency checking is performed.. And even if it did, it would have to run through every disk page on heartbeat failover. There is no history of which pages were edited and in which order. So either you do a quick high level check, or a low level check. But if it's highly probable that many tables are, indeed corrupted, and you won't know until they are accessed appropriately.

On the other hand, In falcon and INNODB, you have a journal.. So it doesn't matter at all which pages were pushed to disk, and in what order, or if a page was overwritten several times, because you replay the journal from the last save point. Save points are added to the journal with INNODB is fully confident that everything is to disk across ALL files.

Note that it's possible that there's never a point at which all transactions are committed, so even at a save point, you may only be 10% through a large number of transactions, and thus you have disk changes which would have to be undone after a fail-over. But supposedly the disk organization allows for semi-efficient scanning. In the absoluate worst case, every record has a version number and a linked-list of changes (in INNODB anyway), so you could identify all records with transactions larger than the latest savepoint and revert to their linked-list reference.. But I don't know for sure.

The point is that INNODB and falcon are designed to be 100% reliable in coming back from a process crash after a random set of disk pages were pushed to disk, so long as it can trust fsync at critical points. Likewise, if DRBD guarantees that the fsync blocks until all data is replicated, then it fullfills this contract. It's possible to configure DRBD unsafely though (with asynchronous replication).

So such contract exists for MyISAM changes, but only if MyISAM never modifies the data (e.g. read-only).

MyISAM also contains a periodic fsync configuration if I recall. However, It is not guaranteed that a crash that happens between a data-change and the next fsync will not corrupt the entire table though (MyISAM can perform record fragmentation, block splitting, etc, in a non-safe fashion). But if your data RARELY changes, and the fsync is set to a high rate, you might be able to take your chances.

The key, however, is that mysql replication should be more reliable than DRBD with even only moderate write levels on MyISAM tables. As you would never get table corruption with replication, only recent data loss, which is similar to INNODB transaction rollbacks, except less deterministic.

Options: ReplyQuote

Written By
December 27, 2007 03:30PM
December 27, 2007 05:26PM
Re: DRBD with non-Innodb engine
January 30, 2008 04:34PM
August 11, 2008 05:12AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.