Multilevel transaction recovery in a database system which loss parent transaction undo operation upon commit of child transaction
First Claim
1. In a database system that include transaction means for performing transactions, including both forward and compensation transactions, on database resources at different levels of abstraction, some transactions, called subtransactions, being constituent operations of other, higher-level, parent transactions;
- logging means for maintaining a durable operation log into which, in response to loggable events in a transaction'"'"'s performance, including the commitment of the transaction, the logging means enters log records that include a transaction ID identifying that transaction; and
recovery means for recovering from an abort of a transaction by causing the transaction means to perform undo operations in accordance with the contents of log records that include that transaction'"'"'s ID, the improvement wherein;
A) the log record entered into the durable operation log in response to a forward substransaction'"'"'s commitment additionally includes that subtransaction'"'"'s parent transaction'"'"'s transaction ID and undo information identifying an undo-operation routine at the parent transaction'"'"'s level for undoing that subtransaction; and
B) the recovery means recovers from an aborted parent transaction by causing the transaction means to perform a compensation transaction at the parent transaction'"'"'s subtransaction'"'"'s level by executing the undo-operation routine identified by the undo information in a log record entered in response to the commitment of a subtransaction of that parent transaction.
2 Assignments
0 Petitions
Accused Products
Abstract
When a subtransaction (46) of a higher-level transaction (50) commits during the operation of a database (10), the database enters into its operation log a record (FIG. 6 ) that acts both as a commit record for the subtransaction (46) and as an update record for the higher-level transaction and includes a field (74) that identifies a higher-level "undo" transaction whereby the subtransaction can be undone without individually undoing its constituent operations. By logging operations in this manner, the database can handle multi-level recovery with very few restrictions on the timing of its updates and log entries.
155 Citations
37 Claims
-
1. In a database system that include transaction means for performing transactions, including both forward and compensation transactions, on database resources at different levels of abstraction, some transactions, called subtransactions, being constituent operations of other, higher-level, parent transactions;
- logging means for maintaining a durable operation log into which, in response to loggable events in a transaction'"'"'s performance, including the commitment of the transaction, the logging means enters log records that include a transaction ID identifying that transaction; and
recovery means for recovering from an abort of a transaction by causing the transaction means to perform undo operations in accordance with the contents of log records that include that transaction'"'"'s ID, the improvement wherein;A) the log record entered into the durable operation log in response to a forward substransaction'"'"'s commitment additionally includes that subtransaction'"'"'s parent transaction'"'"'s transaction ID and undo information identifying an undo-operation routine at the parent transaction'"'"'s level for undoing that subtransaction; and B) the recovery means recovers from an aborted parent transaction by causing the transaction means to perform a compensation transaction at the parent transaction'"'"'s subtransaction'"'"'s level by executing the undo-operation routine identified by the undo information in a log record entered in response to the commitment of a subtransaction of that parent transaction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
- logging means for maintaining a durable operation log into which, in response to loggable events in a transaction'"'"'s performance, including the commitment of the transaction, the logging means enters log records that include a transaction ID identifying that transaction; and
-
19. A database system comprising:
-
A) transaction means for performing transactions, including compensation transactions, on database resources at different levels of abstraction, some transactions, called subtransactions, being constituent operations of other, higher-level, parent transactions; B) logging means for maintaining a common durable operation log into which, in response to loggable events in a transaction'"'"'s performance, including the commitment of the transaction and the updating of a database resource with the results of a constituent operation in that transaction, the logging means enters log records that include a transaction ID identifying that transaction, a record-type field identifying the record type, and, in response to at least some operations, redo information identifying redo-operation routines for redoing those operations, the common operation log receiving log records in response to loggable events in the performance of transactions at all levels, which records are ordered in accordance with the occurrences of the events that they document, the log record entered into the durable operation log in response to a forward subtransaction'"'"'s commitment including that subtransaction'"'"'s parent transaction'"'"'s transaction ID and undo information identifying an undo-operation routine at the parent transaction'"'"'s level for undoing that subtransaction, the log record entered into the durable log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction'"'"'s committed subtransaction including the transaction IDs both of the compensation transaction and of the parent transaction, the contents of the record-type field of a log record entered in response to updating a database resource with the results of a compensation transaction'"'"'s constituent operation when that compensation transaction has not aborted being the same as those of the record-type field of a log record entered in response to updating a database resource with the results of a constituent operation of a transaction that is not a compensation transaction when that compensation transaction has not aborted, the record-type field in a log record entered into the durable operation log in response to an undo operation distinguishing it as a compensation log record, the log record entered into the durable operation log in response to performance of at least some of a compensation transaction'"'"'s constituent operations omitting the aborted parent transaction'"'"'s transaction ID; and C) recovery means for recovering from an abort of a transaction by, first, scanning forward through the operation log and causing the transaction means to perform redo operations in accordance with redo information contained in log records encountered in the forward scan, and then, for each transaction level, performing a separate backward transaction-log scan associated with that level and causing the transaction means to perform undo operations in accordance with the contents of log records encountered in the scan that include the transaction IDs of aborted transactions at the associated level but to refrain from undoing the undo operations that the compensation log records document.
-
-
20. A method of operating a database system comprising the steps of:
-
A) performing transactions on database resources at different levels of abstraction, some transactions, called subtransactions, being constituent operations of other, higher-level, parent transactions; B) maintaining a durable operation log by responding to a loggable event in a transaction'"'"'s performance by entering into the operation log a log record that includes a transaction ID identifying that transaction and, when the loggable event is the commitment of a forward subtransaction, additionally includes that subtransaction'"'"'s parent transaction'"'"'s transaction ID and undo information identifying an undo-operation routine at the parent transaction'"'"'s level for undoing that subtransaction; and C) recovering from an aborted parent transaction by performing a compensation transaction at the parent transaction'"'"'s subtransaction'"'"'s level by executing the undo-operation routine identified by the undo information in a log record entered in response to the commitment of a subtransaction of that parent transaction. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37)
-
Specification