Method and apparatus for making available data that was locked by a dead transaction before rolling back the entire dead transaction
First Claim
1. A method for applying redo records from a log that reflect changes to a plurality resources, the method comprising the steps of:
- for each resource of said plurality of resources, establishing links that link together a set of redo records that contain changes made to the resource;
for a particular resource of said plurality of resources, applying changes in the respective set of redo records to cause a particular resource to reflect changes made to the particular resource in volatile memory before a failure;
wherein the step of applying changes includes following the respective links established for the particular resource to apply the changes contained in the respective set of redo records; and
wherein establishing links that link together the set of redo records for each resource of said plurality of resources is performed prior to the failure.
0 Assignments
0 Petitions
Accused Products
Abstract
Described is an approach for recovering the failure of a transaction. According to the approach, a first change and a third change is made to a first resource and a second change is made to a second resource. The second change was made after the first but before the third. However, to recover the failure of the transaction, a recovery record for the third change is applied before the recovery record for the second change. Also described is an approach involving establishing links that link together a set of undo records that contain changes made to the particular resource. Also described is an approach for applying two or more undo records in parallel.
-
Citations
28 Claims
-
1. A method for applying redo records from a log that reflect changes to a plurality resources, the method comprising the steps of:
-
for each resource of said plurality of resources, establishing links that link together a set of redo records that contain changes made to the resource; for a particular resource of said plurality of resources, applying changes in the respective set of redo records to cause a particular resource to reflect changes made to the particular resource in volatile memory before a failure; wherein the step of applying changes includes following the respective links established for the particular resource to apply the changes contained in the respective set of redo records; and wherein establishing links that link together the set of redo records for each resource of said plurality of resources is performed prior to the failure. - View Dependent Claims (2)
-
-
3. A method for applying changes in redo records to make a resource available, wherein the resource is locked by a dead transaction, the method comprising, the steps of:
-
(A) identifying a redo record in a block-based redo chain, wherein the redo record contains least recent changes made as of a particular checkpoint time that need to be applied to the resource; (B) applying the least recent changes contained in the redo record to the resource; and (C) repeating steps (A) and (B) until all changes that are contained in redo records in the block-based redo chain have been applied to the resource.
-
-
4. A method for applying changes in two or more undo records in parallel, wherein a plurality of resources are locked by a dead transaction, the method comprising the steps of:
-
identifying, within a single undo log file, a plurality of sets of undo records, wherein each set of undo records of said plurality of sets of undo records does not contain any undo record that depends on any undo record in any other set of undo records of said plurality of sets of undo records; and applying the plurality of sets of undo records in parallel relative to one another. - View Dependent Claims (5, 6, 7)
-
-
8. A method for linking undo records, the method comprising the steps of:
-
identifying an undo record, wherein the undo record contains change information that is associated with a particular resource; linking the undo record into an undo record chain, wherein the undo record chain contains only undo records that contain change information that is associated with the particular resource; and wherein the step of linking the undo record includes generating identifying data in at least one of the records in the undo record chain or in the undo record, wherein said identifying data once generated identifies a particular record in the undo record chain. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A method for recovering after failure of a transaction, the method comprising the step of:
-
prior to said failure, storing in a first recovery record data that reflects a first change made by the transaction to a first resource; after making said first change and prior to said failure, storing in a second recovery record data that reflects a second change by the transaction to a second resource; after making said second change and prior to said failure, storing in a third recovery record data that reflects a third change to said first resource; after said failure, recovering said transaction; and wherein the step of recovering said transaction includes applying said data in said first recovery record and said data in said third recovery record prior to applying said data in said second recovery record. - View Dependent Claims (14)
-
-
15. A computer-readable storage medium storing one or more sequences of instructions for applying redo records from a log that reflect changes to a plurality resources, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
for each resource of said plurality of resources, establishing links that link together a set of redo records that contain changes made to the resource; for a particular resource of said plurality of resources, applying changes in the respective set of redo records to cause a particular resource to reflect changes made to the particular resource in volatile memory before a failure; wherein the step of applying changes includes following the respective links established for the particular resource to apply the changes contained in the respective set of redo records; and wherein establishing links that link together the set of redo records for each resource of said plurality of resources is performed prior to the failure. - View Dependent Claims (16)
-
-
17. A computer-readable storage medium storing one or more sequences of instructions for applying changes in redo records to make a resource available, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
(A) identifying a redo record in a block-based redo chain, wherein the redo record contains least recent changes made as of a particular checkpoint time that need to be applied to the resource; (B) applying the least recent changes contained in the redo record to the resource; and (C) repeating steps (A) and (B) until all changes that are contained in redo records in the block-based redo chain have been applied to the resource.
-
-
18. A computer-readable storage medium storing one or more sequences of instructions for applying changes in two or more undo records in parallel, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
identifying, within a single undo log file, a plurality of sets of undo records, wherein each set of undo records of said plurality of sets of undo records does not contain any undo record that depends on any undo record in any other set of undo records of said plurality of sets of undo records; and applying the plurality of sets of undo records in parallel relative to one another. - View Dependent Claims (19, 20, 21)
-
-
22. A computer-readable storage medium storing one or more sequences of instructions for linking undo records, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
identifying an undo record, wherein the undo record contains change information that is associated with a particular resource; linking the undo record into an undo record chain, wherein the undo record chain contains only undo records that contain change information that is associated with the particular resource; and wherein the step of linking the undo record includes generating identifying data in at least one of the records in the undo record chain or in the undo record, wherein said identifying data once generated identifies a particular record in the undo record chain. - View Dependent Claims (23, 24, 25, 26)
-
-
27. A computer-readable storage medium storing one or more sequences of instructions for recovering after failure of a transaction, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
prior to said failure, storing in a first recovery record data that reflects a first change made by the transaction to a first resource; after making said first change and prior to said failure, storing in a second recovery record data that reflects a second change by the transaction to a second resource; after making said second change and prior to said failure, storing in a third recovery record data that reflects a third change to said first resource; after said failure, recovering said transaction; and wherein the step of recovering said transaction includes applying said data in said first recovery record and said data in said third recovery record prior to applying said data in said second recovery record. - View Dependent Claims (28)
-
Specification