MPE/iX Transaction Management F acility

The MPE/iX Transaction Managemen t Facility provides the following functions for transaction-orien ted applications:

Automatic transaction loc king

Automatic transaction logging

Automatic rollbac k recovery from "soft" failures

Semi-automatic rollforward reco very from "hard" failures These functions are described in detail in the subsections belo w.

Transaction Locking

A transaction is a series of data updates that m ust be entirely completed to obtain logical consistency; either all or none of the updates in the series m ust be done. To the user, a transaction ma y appear to be a single c hange. However, internal to the system, it ma y require many changes to records in sev eral ￿les or data sets.

For example, if you enter a customer order on the system with a simple command, it ma y internally require updating sev eral ￿les containing data on orders, customers, and in ventory requirements. The multiple changes, all of whic h are required for logical consistency , form one transaction.

The MPE/iX Transaction Managemen t Facility ensures data consistency and in tegrity by providing automatic transaction loc king. Transaction locking meets two criteria:

Only one transaction at a time is allo wed to update a giv en portion of data.

All changes that are part of a transaction m ust be completed before the c hanges are committed to disc (permanen tly recorded). When a transaction is abnormally terminated before it is completed, the c hanges made up to that poin t are not committed.

MPE/iX transaction loc king is based on page-lev el protection of the system arc hitecture and does not require signi￿can t CPU overhead.

Transaction Logging and Recovery

The Transaction Managemen t Facility automatically generates and main tains a transaction log ￿le that records all transaction updates. Main taining a log ￿le facilitates reco very from the abnormal end of transactions and system failures. In these cases, ￿les can be restored to a consistent state by copying the contents of the log ￿le in to the data ￿le. This "undoes" the actions of partially committed transactions.

System failures are either hard or soft. When a soft failure occurs, data is not altered or lost, but some incomplete transactions ma y exist. In this case, the Reco very Manager portion of the Transaction Managemen t Facility is automatically in voked to perform reco very of the data ￿le when the system is restarted. Files are restored to their original state b y copying the "before image " of data from the log ￿le for incomplete transactions. This is called rollbac k recovery. Recovery from a soft failure is e￿cien t and takes a maximum of only a few min utes. Rollback recovery is automatically performed for abnormally ended transactions.

When a hard failure occurs (for example, a disc media failure), data is lost. A t system restart, you must mount a backup tape and issue the MPE/iX command :RECOVER . The

1-10 OVERVIEW