12.07.2015 Views

Caché High Availability Guide - InterSystems Documentation

Caché High Availability Guide - InterSystems Documentation

Caché High Availability Guide - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RecoveryDue to the sequential nature of disk access, any sudden, unexpected interruption of disk orcomputer operation can halt the update of multiple database blocks after the first block hasbeen written but before the last block has been updated. This incomplete update leads to aninconsistent database structure. The consequences can be as severe as a database that is totallyunusable, all data irretrievable by normal means.The <strong>Caché</strong> write image journaling technology uses a two-phase process of writing to thedatabase to protect against such events as follows:• In the first phase, <strong>Caché</strong> records the changes needed to complete the update in the writeimage journal. Once it enters all updates to the write image journal, it sets a flag in thefile and the second phase begins.• In the second phase, the Write daemon writes the changes recorded in the write imagejournal to the database on disk. When this second phase completes, the Write daemonsets a flag in the write image journal to indicate it is empty.When <strong>Caché</strong> starts, it automatically checks the write image journal and runs a recovery procedureif it detects that an abnormal shutdown occurred. When the procedure completessuccessfully, the internal integrity of the database is restored.<strong>Caché</strong> write image journaling guarantees the order of updates. The Write daemon records alldatabase modifications in the image journal. For example, assume that modifications A, B,and C normally occur in that order, but that only B is split over multiple blocks. All threemodifications are in the image journal, and are written to the database, so all three are in thedatabase following a failure, or none of them are.1.2 RecoveryWhen <strong>Caché</strong> starts, it automatically checks the write image journal and runs a recovery procedureif it detects that an abnormal shutdown occurred. Recovery is necessary if a systemcrash or other major system malfunction occurs at either of the following points in the twophasewrite protocol process:• Before the Write daemon has completed writing the update to the write image journal.In this case, recovery discards the incomplete entry and updates are lost. However, thedatabases are in a consistent and usable state and the transaction journal file can be applied,if it is being used, to restore any updates which may have been lost because they had notyet been written to the database. See the Journaling chapter for more information.<strong>Caché</strong> <strong>High</strong> <strong>Availability</strong> <strong>Guide</strong> 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!