Method for providing data availability in a transaction-oriented system during restart after a failure
AssigneeInternational Business Machines Corporation
InventorChandrasekaran Mohan
Life of this patent
Estimating the term…
Abstract
Enhanced data availability occurs in a write-ahead logging, transaction-oriented database system by permitting new transactions to acquire access to data while restart recovery operations are proceeding. The invention permits new transactions to acquire access to data during restart recovery UNDO processing on the condition that the last update to the data occurred before a commit point measured by the beginning of the earliest-commencing transaction with uncommitted updates which was still executing when a system failure initiated restart recovery operations. During REDO processing, a transaction is permitted access to data which, in addition to meeting the commit point condition, is not in a data structure subject to the REDO processing.
Claims6
A method for providing data structures for transaction processing in a database system which includes a database processor, a main memory coupled to the processor, non-volatile storage for storing data structures which are staged to and from the main memory for transaction processing, a write-ahead log having a sequence of log records describing transaction updates made to data structures in the non-volatile storage, and a restart recovery mechanism,
- the restart mechanism including a REDO component for amending data structures in the non-volatile storage by adding to the structures updates which had not been made in the non-volatile storage by the time a failure affecting the database system occurred, and
- an UNDO component for rolling back transactions which were incomplete at the time of the failure and for which no log commit or in-doubt records exist in the log (in-flight transactions),
- the method comprising the steps of:
- (a) assigning a log sequence number (LSN) to each log record which denotes the log record's position in the sequence;
- (b) entering into each data structure staged into the non-volatile storage from the main memory, an LSN denoting the last update made to the data structure;
- (c) operating the restart mechanism in response to a failure in the system;
- (d) during step (c):
- (1) commencing a transaction and issuing a request from the transaction for a data structure in the non-volatile storage;
- (2) comparing the LSN in the data structure with a COMMIT.sub.13 LSN, the COMMIT.sub.13 LSN being the minimum of the LSNs denoting begin transaction log records of the in-flight transactions;
- and
- (3) if the LSN in the data structure is less than the COMMIT.sub.13 LSN, providing the data structure to the transaction;
- otherwise
- (4) suspending the transaction until step (c) is completed.
Dependencies are inferred from the claim text.