Patent US5287501A successfully refreshed from Google Patents.
← Back to Patent Explorer
US5287501A Expired / Lapsed US ⏱️ 0.0 years remaining

Multilevel transaction recovery in a database system which loss parent transaction undo operation upon commit of child transaction

Assignee: Hewlett Packard Development Co LP
•
Filing: 1991-07-11
•
Granted: 1994-02-15
•
Expires: 2011-07-11
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

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.

Inventors

  • 👤 David B. Lomet

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-24 22:42
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/07; G06F11/14; G06F11/1474; G06F2201/00; G06F2201/87; Y; Y10; Y10S; Y10S707/00; Y10S707/99951; Y10S707/99952; Y10S707/99953

Claims Analysis

Total Claims: 40
Claim 1
Independent Claim 207 words
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.
Claim 2
Dependent Claim 207 words
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.
Claim 3
Dependent Claim 56 words
A database system as defined in claim 1 wherein: A) the compensation transaction at the subtransaction's level comprises a plurality of constituent operations at that level; and B) in response to performance of at least some of the compensation transaction's constituent operations, the logging means enters log records that omit the aborted parent transaction's transaction ID.
Claim 4
Dependent Claim 118 words
A database system as defined in claim 2 wherein: A) the log records entered in response to at least some operations contain redo information identifying redo-operation routines for redoing those operations; and B) in recovering from an aborted transaction, the recovery means: i) first scans forward through the operation log and causes the transaction means to perform redo operations in accordance with redo information contained in log records encountered in the forward scan; and ii) then, for each transaction level, performs a separate backward transaction-log scan associated therewith and causes the transaction means to perform undo operations in accordance with undo information in the log records entered in response to operations of aborted transactions at the associated level.
Claim 5
Dependent Claim 50 words
A database system as defined in claim 3 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 6
Dependent Claim 52 words
A database system as defined in claim 3 wherein the logging means enters log records in response to loggable events in the performance of transactions at all levels in a common durable operation log in which the log records are ordered in accordance with the occurrences of the events that they document.
Claim 7
Dependent Claim 50 words
A database system as defined in claim 2 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 8
Dependent Claim 46 words
A database system as defined in claim 6 wherein: A) in response to undo operations, the logging means enters log records whose contents distinguish them as compensation log records; and B) the recovery means refrains from undoing the undo operations that the compensation log records document.
Claim 9
Dependent Claim 118 words
A database system as defined in claim 1 wherein: A) the log records entered in response to at least some operations contain redo information identifying redo-operation routines for redoing those operations; and B) in recovering from an aborted transaction, the recovery means: i) first scans forward through the operation log and causes the transaction means to perform redo operations in accordance with redo information contained in lo records encountered in the forward scan; and ii) then, for each transaction level, performs a separate backward transaction-log scan associated therewith and causes the transaction means to perform undo operations in accordance with undo information in the log records entered in response to operations of aborted transactions at the associated level.
Claim 10
Dependent Claim 50 words
A database system as defined in claim 8 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 11
Dependent Claim 46 words
A database system as defined in claim 9 wherein: A) in response to undo operations, the logging means enters log records whose contents distinguish them as compensation log records; and B) the recovery means refrains from undoing the undo operations that the compensation log records document.
Claim 12
Dependent Claim 52 words
A database system as defined in claim 8 wherein the logging means enters log records in response to loggable events in the performance of transactions at all levels in a common durable operation log in which the log records are ordered in accordance with the occurrences of the events that they document.
Claim 13
Dependent Claim 50 words
A database system as defined in claim 1 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 14
Dependent Claim 46 words
A database system as defined in claim 12 wherein: A) in response to undo operations, the logging means enters log records whose contents distinguish them as compensation log records; and B) the recovery means refrains from undoing the undo operations that the compensation log records document.
Claim 15
Dependent Claim 132 words
A database system as defined in claim 12 wherein: A) among the loggable events to which the logging means responds by entering a log record is the updating of a database resource with the results of an operation; B) each log record includes a record-type field that identifies that log record's type; and C) 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 are 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.
Claim 16
Dependent Claim 46 words
A database system as defined in claim 14 wherein: A) in response to undo operations, the logging means enters log records whose contents distinguish them as compensation log records; and B) the recovery means refrains from undoing the undo operations that the compensation log records document.
Claim 17
Dependent Claim 52 words
A database system as defined in claim 1 wherein the logging means enters log records in response to loggable events in the performance of transactions at all levels in a common durable operation log in which the log records are ordered in accordance with the occurrences of the events that they document.
Claim 18
Dependent Claim 132 words
A database system as defined in claim 1 wherein: A) among the loggable events to which the logging means responds by entering a log record is the updating of a database resource with the results of an operation; B) each log record includes a record-type field that identifies the log record's type; and C) 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 are 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.
Claim 19
Dependent Claim 46 words
A database system as defined in claim 1 wherein: A) in response to undo operations, the logging means enters log records whose contents distinguish them as compensation log records; and B) the recovery means refrains from undoing the undo operations that the compensation log records document.
Claim 20
Dependent Claim 469 words
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.
Claim 21
Dependent Claim 469 words
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.
Claim 22
Independent Claim 149 words
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.
Claim 23
Independent Claim 149 words
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.
Claim 24
Dependent Claim 61 words
A method as recited in claim 20 wherein: A) the compensation transaction at the subtransaction's level comprises a plurality of constituent operations at that level; and B) the step of maintaining a durable operation log includes entering, in response to performance of at least some of the compensation transaction's constituent operations, log records that omit the aborted parent transaction's transaction ID.
Claim 25
Dependent Claim 102 words
A method as recited in claim 21 wherein: A) the log records entered in response to at least some operations contain redo information identifying redo-operation routines for redoing those operations; and B) the recovery step comprises: i) first scanning forward through the operation log and performing redo operations in accordance with redo information contained in log records encountered in the forward scan; and ii) then, for each transaction level, performing a separate backward transaction-log scan associated therewith and performing undo operations in accordance with undo information in the log records entered in response to operations of aborted transactions at the associated level.
Claim 26
Dependent Claim 49 words
A method as defined in claim 22 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 27
Dependent Claim 52 words
A method as defined in claim 22 wherein the logging step comprises entering log records in response to loggable events in the performance of transactions at all levels in a common durable operation log in which the log records are ordered in accordance with the occurrences of the events that they document.
Claim 28
Dependent Claim 49 words
A method as defined in claim 21 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 29
Dependent Claim 47 words
A method as defined in claim 25 wherein: A) the logging step comprises responding to undo operations by entering log records whose contents distinguish them as compensation log records; and B) the recovery step comprises refraining from undoing the undo operations that the compensation log records document.
Claim 30
Dependent Claim 102 words
A method as recited in claim 20 wherein: A) the log records entered in response to at least some operations contain redo information identifying redo-operation routines for redoing those operations; and B) the recovery step comprises: i) first scanning forward through the operation log and performing redo operations in accordance with redo information contained in log records encountered in the forward scan; and ii) then, for each transaction level, performing a separate backward transaction-log scan associated therewith and performing undo operations in accordance with undo information in the log records entered in response to operations of aborted transactions at the associated level.
Claim 31
Dependent Claim 49 words
A method as defined in claim 27 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 32
Dependent Claim 47 words
A method as defined in claim 28 wherein: A) the logging step comprises responding to undo operations by entering log records whose contents distinguish them as compensation log records; and B) the recovery step comprises refraining from undoing the undo operations that the compensation log records document.
Claim 33
Dependent Claim 52 words
A method as defined in claim 27 wherein the logging step comprises entering log records in response to loggable events in the performance of transactions at all levels in a common durable operation log in which the log records are ordered in accordance with the occurrences of the events that they document.
Claim 34
Dependent Claim 49 words
A method as defined in claim 20 wherein the log record entered into the durable operation log in response to the commitment of a compensation transaction performed to undo an aborted parent transaction's committed subtransaction includes the transaction IDs both of the compensation transaction and of the parent transaction.
Claim 35
Dependent Claim 47 words
A method as defined in claim 31 wherein: A) the logging step comprises responding to undo operations by entering log records whose contents distinguish them as compensation log records; and B) the recovery step comprises refraining from undoing the undo operations that the compensation log records document.
Claim 36
Dependent Claim 120 words
A method as defined in claim 31 wherein: A) the logging step includes entering a log record in response to the updating of a database resource with the results of an operation; B) each log record includes a record-type field that identifies the log record's type; and C) in response to the updating of a database resource with the results of a compensation transaction's constituent operation when that compensation transaction has not aborted, entering a log record whose record-type-field contents are the same as those 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.
Claim 37
Dependent Claim 47 words
A method as defined in claim 33 wherein: A) the logging step comprises responding to undo operations by entering log records whose contents distinguish them as compensation log records; and B) the recovery step comprises refraining from undoing the undo operations that the compensation log records document.
Claim 38
Dependent Claim 52 words
A method as defined in claim 20 wherein the logging step comprises entering log records in response to loggable events in the performance of transactions at all levels in a common durable operation log in which the log records are ordered in accordance with the occurrences of the events that they document.
Claim 39
Dependent Claim 133 words
A method as defined in claim 20 wherein: A) the logging step includes entering a log record in response to the updating of a database resource with the results of an operation; B) each log record includes a record-type field; C) the recovering step includes interpreting the remainder of a log record on the basis of its record-type field; and D) in response to the updating of a database resource with the results of a compensation transaction's constituent operation when that compensation transaction has not aborted, entering a log record whose record-type-field contents are the same as those 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.
Claim 40
Dependent Claim 47 words
A method as defined in claim 20 wherein: A) the logging step comprises responding to undo operations by entering log records whose contents distinguish them as compensation log records; and B) the recovery step comprises refraining from undoing the undo operations that the compensation log records document.

References Cited (Backward Citations)

US4648031A Cited
US5155678A Cited
US4868744A Cited
US4819159A Cited
US4945474A Cited
US5043866A Cited
US5095421A Cited
EP0425415A2 Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1997-02-14 1997-08-16 1998-02-15 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2001-02-14 2001-08-16 2002-02-15 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2005-02-14 2005-08-16 2006-02-15 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag