Data Consistency, Recovery, and Migration 4-39
Fast Recovery
Fast Recovery
Fast recovery is an automatic, fault tolerance feature that OnLine executes
any time the operating mode changes from offline to quiescent mode. The
aim of fast recovery is to return OnLine to a state of physical and logical
consistency with minimal loss of work in the event of a system failure.
Fast recovery attains two goals:
■ The physical log is used to return OnLine to the most-recent point of
known physical consistency, the most-recent checkpoint.
■ The logical log files are used to return OnLine to logical consistency,
by rolling forward all committed transactions that have occurred
since the checkpoint and rolling back all transactions that were left
incomplete.
Fast recovery addresses situations like the following: OnLine is processing
tasks for more than 40 users. Dozens of transactions are ongoing. Without
warning, the operating system fails.
How does OnLine bring itself to a consistent state again? What happens to
ongoing transactions?
How Does OnLine Initiate Fast Recovery?
OnLine checks to see if fast recovery is needed every time that the adminis-
trator brings OnLine to quiescent mode from offline mode.
As part of shared-memory initialization, tbinit checks the contents of the
physical log. Normally, the physical log is empty when OnLine shuts down
under controlled circumstances. The move from online mode to quiescent
mode includes a checkpoint, which flushes the physical log. Therefore, if
tbinit finds pages in the physical log, it is clear OnLine went offline under
uncontrolled conditions, and fast recovery begins.