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

Method and apparatus for improved transaction recovery

Assignee: Oracle International Corp
•
Filing: 1996-03-19
•
Granted: 1998-12-15
•
Expires: 2016-03-19
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A method and system for recovering after a crash of an instance in a database is disclosed. According to the method, transaction information corresponding to all the transactions that existed in the failed instance is inspected. These transactions that were active at the time the instance crashed are marked as "dead." The database is made available to users after updating the transaction information and before undoing all of the changes or updates performed by dead transactions. The changes made by the dead transactions may be undone by new transactions on a on-demand basis after the database is made available. Specifically, when a new transaction is waiting to obtain a lock on a resource held by another transaction, the new transaction determines whether the owner of the lock is one of the dead transactions. If so, the new transaction rolls back some or all of the changes made by the dead transaction.

Inventors

  • 👤 Gary C. Ngai
  • 👤 Hasan Rizvi
  • 👤 Leng Leng Tan

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-05 11:45
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/07; G06F11/14; G06F11/1474; G06F2201/00; G06F2201/80; Y; Y10; Y10S; Y10S707/00; Y10S707/99951; Y10S707/99952; Y10S707/99953

Claims Analysis

Total Claims: 34
Claim 1
Independent Claim 195 words
A method for recovering after a crash of an instance of a database, wherein one or more transactions were active when the instance crashed, the method comprising the computer implemented steps of: finding transaction information that corresponds to one or more transactions that existed in the instance; determining, based on the transaction information, whether the one or more transactions that existed in the instance were active when the instance crashed; if the one or more transactions were active when the instance crashed, then updating the transaction information to indicate that the one or more transactions that were active when the instance crashed are dead; making the database available to users after updating the transaction information and before undoing all of the updates performed by the one or more transactions that were active when the instance crashed; executing a new transaction; when the new transaction requests access to a resource, determining that the resource belongs to a particular transaction that was active when the instance crashed; and in response to determining that the resource belongs to the particular transaction that was active when the instance crashed, undoing one or more changes made by the particular transaction.
Claim 2
Independent Claim 195 words
A method for recovering after a crash of an instance of a database, wherein one or more transactions were active when the instance crashed, the method comprising the computer implemented steps of: finding transaction information that corresponds to one or more transactions that existed in the instance; determining, based on the transaction information, whether the one or more transactions that existed in the instance were active when the instance crashed; if the one or more transactions were active when the instance crashed, then updating the transaction information to indicate that the one or more transactions that were active when the instance crashed are dead; making the database available to users after updating the transaction information and before undoing all of the updates performed by the one or more transactions that were active when the instance crashed; executing a new transaction; when the new transaction requests access to a resource, determining that the resource belongs to a particular transaction that was active when the instance crashed; and in response to determining that the resource belongs to the particular transaction that was active when the instance crashed, undoing one or more changes made by the particular transaction.
Claim 3
Dependent Claim 56 words
The method of claim 1 further comprising the step of applying a plurality of changes recorded in a redo log to a data file, wherein the plurality of changes comprises changes made by transactions that existed in the instance but which had not yet been applied to the data file at the time the instance crashed.
Claim 4
Dependent Claim 38 words
The method of claim 1 wherein the step of determining whether the resource belongs to a particular transaction that was active when the instance crashed comprises checking a container for an identity of an owner of the resource.
Claim 5
Dependent Claim 56 words
The method of claim 3 further comprising the steps of: finding transaction information relating to the owner of the resource based on the identity of the owner; and inspecting the transaction information relating to the owner of the resource to determine whether the transaction information relating to the owner of the resource is marked as dead.
Claim 6
Dependent Claim 39 words
The method of claim 1 wherein the step of undoing one or more changes made by the particular transaction comprises: retrieving a location of a rollback entry for the particular transaction; and executing operations specified in the rollback entry.
Claim 7
Dependent Claim 30 words
The method of claim 1 further comprising the step of running an independent process which undoes changes made by transactions having corresponding transaction information indicating that the transactions are dead.
Claim 8
Dependent Claim 42 words
The method of claim 6 wherein the step of running an independent process includes the step of running an independent process which applies a predefined number of undo records on the transactions having corresponding transaction information indicating that the transactions are dead.
Claim 9
Dependent Claim 77 words
The method of claim 1 wherein the step of finding transaction information that corresponds to one or more transactions that existed in the instance comprises: identifying a rollback segment associated with the instance that crashed; accessing a transaction table in the rollback segment, the transaction table including a plurality of entries each of which corresponds to a plurality of transactions that existed in that instance; and reading a status field in each of the plurality of entries.
Claim 10
Dependent Claim 50 words
The method of claim 1 wherein the step of updating the transaction information to indicate that the one or more transactions that were active when the instance crashed are dead comprises setting a flag in a field of an entry that is associated with a transaction in a transaction table.
Claim 11
Dependent Claim 36 words
The method of claim 1, wherein the step of undoing one or more changes made by the particular transaction includes the step of undoing one or more changes made by the particular transaction to the resource.
Claim 12
Dependent Claim 51 words
The method of claim 10, wherein the particular transaction made changes to a plurality of resources, and the step of undoing one or more changes made by the particular transaction to the resource is performed by undoing only the one or more changes made by the particular transaction to the resource.
Claim 13
Dependent Claim 38 words
The method of claim 1, wherein the step of undoing one or more changes made by the particular transaction includes the step of causing the new transaction to undo one or more changes made by the particular transaction.
Claim 14
Independent Claim 89 words
A method for recovering after a premature termination of a transaction, the method comprising the computer implemented steps of: starting execution of a new transaction after the premature termination of the transaction and before all updates made by the prematurely terminated transaction have been undone; when the new transaction requests access to a resource, determining that the resource belongs to the prematurely terminated transaction; and in response to determining that the resource belongs to the prematurely terminated transaction, undoing one or more changes made by the prematurely terminated transaction.
Claim 15
Independent Claim 89 words
A method for recovering after a premature termination of a transaction, the method comprising the computer implemented steps of: starting execution of a new transaction after the premature termination of the transaction and before all updates made by the prematurely terminated transaction have been undone; when the new transaction requests access to a resource, determining that the resource belongs to the prematurely terminated transaction; and in response to determining that the resource belongs to the prematurely terminated transaction, undoing one or more changes made by the prematurely terminated transaction.
Claim 16
Dependent Claim 37 words
The method of claim 13 wherein the step of determining that the resource belongs to the prematurely terminated transaction includes the step of checking a container associated with the resource to identify an owner of the resource.
Claim 17
Dependent Claim 56 words
The method of claim 14 further comprising the steps of: finding transaction information relating to the owner of the resource based on the identity of the owner; and inspecting the transaction information relating to the owner of the resource to determine whether the transaction information relating to the owner of the resource is marked as active.
Claim 18
Dependent Claim 41 words
The method of claim 13 wherein the step of undoing one or more changes made by the prematurely terminated transaction comprises: retrieving a location of a rollback entry for the prematurely terminated transaction; and executing operations specified in the rollback entry.
Claim 19
Dependent Claim 38 words
The method of claim 13, wherein the step of undoing one or more changes made by the prematurely terminated transaction includes the step of undoing one or more changes made by the prematurely terminated transaction to the resource.
Claim 20
Dependent Claim 54 words
The method of claim 17, wherein the prematurely terminated transaction made changes to a plurality of resources, and the step of undoing one or more changes made by the prematurely terminated transaction to the resource is performed by undoing only the one or more changes made by the prematurely terminated transaction to the resource.
Claim 21
Dependent Claim 40 words
The method of claim 13, wherein the step of undoing one or more changes made by the prematurely terminated transaction includes the step of causing the new transaction to undo one or more changes made by the prematurely terminated transaction.
Claim 22
Dependent Claim 30 words
The method of claim 13, further comprising the step of running an independent process which undoes changes made by transactions having corresponding transaction information indicating that the transactions are dead.
Claim 23
Dependent Claim 42 words
The method of claim 20, wherein the step of running an independent process includes the step of running an independent process which applies a predefined number of undo records on the transactions having corresponding transaction information indicating that the transactions are dead.
Claim 24
Dependent Claim 85 words
The method of claim 13, wherein the premature termination of the transaction is caused by a crash of an instance of a database, and the step of starting execution of a new transaction after the premature termination of the transaction and before all updates made by the prematurely terminated transaction have been undone includes the step of starting execution of a new transaction after the crash of the instance of the database and before all updates made by the prematurely terminated transaction have been undone.
Claim 25
Dependent Claim 210 words
A computer-readable medium having stored thereon sequences of instructions for recovering after a crash of an instance of a database, wherein one or more transactions were active when the instance crashed, the sequences of instructions including instructions which, when executed by a processor, cause the processor to perform the steps of: finding transaction information that corresponds to one or more transactions that existed in the instance; determining, based on the transaction information, whether the transactions that existed in the instance were active when the instance crashed; if one or more transactions were active when the instance crashed, then updating the transaction information to indicate that the one or more transactions that were active when the instance crashed are dead; making the database available to users after updating the transaction information and before undoing all of the updates performed by the one or more transactions that were active when the instance crashed; executing a new transaction; when the new transaction requests access to a resource, determining that the resource belongs to a particular transaction that was active when the instance crashed; and in response to determining that the resource belongs to the particular transaction that was active when the instance crashed, undoing one or more changes made by the particular transaction.
Claim 26
Dependent Claim 210 words
A computer-readable medium having stored thereon sequences of instructions for recovering after a crash of an instance of a database, wherein one or more transactions were active when the instance crashed, the sequences of instructions including instructions which, when executed by a processor, cause the processor to perform the steps of: finding transaction information that corresponds to one or more transactions that existed in the instance; determining, based on the transaction information, whether the transactions that existed in the instance were active when the instance crashed; if one or more transactions were active when the instance crashed, then updating the transaction information to indicate that the one or more transactions that were active when the instance crashed are dead; making the database available to users after updating the transaction information and before undoing all of the updates performed by the one or more transactions that were active when the instance crashed; executing a new transaction; when the new transaction requests access to a resource, determining that the resource belongs to a particular transaction that was active when the instance crashed; and in response to determining that the resource belongs to the particular transaction that was active when the instance crashed, undoing one or more changes made by the particular transaction.
Claim 27
Dependent Claim 75 words
The computer-readable medium of claim 23 wherein the step of undoing one or more changes made by the particular transaction includes the step of causing the new transaction to apply a plurality of changes recorded in a redo log to a data file, wherein the plurality of changes comprises changes made by transactions that existed in the instance but which had not yet been applied to the data file at the time the instance crashed.
Claim 28
Dependent Claim 39 words
The computer-readable medium of claim 23 wherein the step of determining that the resource belongs to a particular transaction that was active when the instance crashed comprises checking a container for an identity of an owner of the resource.
Claim 29
Dependent Claim 70 words
The computer-readable medium of claim 25 further containing instructions which, when executed by the processor, would cause the processor to perform the steps of: finding transaction information relating to the owner of the resource based on the identify of the owner; and inspecting the transaction information relating to the owner of the resource to determine whether the transaction information relating to the owner of the resource is marked as dead.
Claim 30
Dependent Claim 39 words
The-computer-readable medium of claim 23 wherein the step of undoing one or more changes made by the particular transaction comprises: retrieving a location of a rollback entry for the particular transaction; and executing operations specified in the rollback entry.
Claim 31
Dependent Claim 36 words
The computer-readable medium of claim 23 wherein the step of undoing one or more changes made by the particular transaction comprises running an independent process which undoes one or more changes made by the particular transaction.
Claim 32
Dependent Claim 35 words
The computer-readable medium of claim 23 wherein the step of undoing one or more changes made by the particular transaction includes the step of applying a predefined number of undo records on the particular transaction.
Claim 33
Dependent Claim 78 words
The computer-readable medium of claim 23 wherein the step of finding transaction information that corresponds to one or more transactions that existed in the instance comprises: identifying a rollback segment associated with the instance that crashed; accessing a transaction table in the rollback segment, the transaction table including a plurality of entries each of which corresponds to a plurality of transactions that existed in that instance; and reading a status field in each of the plurality of entries.
Claim 34
Dependent Claim 51 words
The computer-readable medium of claim 23 wherein the step of updating the transaction information to indicate that the one or more transactions that were active when the instance crashed are dead comprises setting a flag in a field of an entry that is associated with a transaction in a transaction table.

References Cited (Backward Citations)

US5155678A Cited
US5065311A Cited
US5201044A Cited
US5524205A Cited
US5333303A Cited
US5551046A Cited
US5280611A Cited
US5440727A Cited
US5524241A Cited
US5481699A Cited
US5524239A Cited
US5561795A Cited
US5630047A Cited

USPTO Annuity & Maintenance Windows

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

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag