Algorithms for Recovery and Isolation Exploiting Semantics

In computer science, Algorithms for Recovery and Isolation Exploiting Semantics, or ARIES, is a recovery algorithm designed to work with a no-force, steal database approach; it is used by IBM Db2, Microsoft SQL Server and many other database systems.

[1] IBM Fellow Chandrasekaran Mohan is the primary inventor of the ARIES family of algorithms.

The Redo phase restores the database to the exact state at the crash, including all the changes of uncommitted transactions that were running at that point in time.

From the DPT, we can compute the minimal Sequence Number of a dirty page.

If page P exists in the DPT table, then we see whether the Sequence Number in the DPT is smaller than the Sequence Number of the log record (i.e. whether the change in the log is newer than the last version that was persisted).

That check is necessary because the recovered DPT is only a conservative superset of the pages that really need changes to be reapplied.

Lastly, when all the above checks are finished and failed, we reapply the redo action and store the new Sequence Number on the page.

However the changes of uncommitted transactions have to be undone to restore the database to a consistent state.

The compensation log records make it possible to recover during a crash that occurs during the recovery phase.

From that point it is possible to restore the DPT and the TT as they were at the time of the crash by reading the logfile forward again.