IP Library › Granted Patent US 11,003,549
Granted Patent B2
US 11,003,549 · App. 16/045,715 · Granted May 11, 2021

Constant time database recovery

Inventors: Panagiotis Antonopoulos (Redmond, WA); Adrian-Leonard Radu (Redmond, WA); Hanumantha Rao Kodavalla (Sammamish, WA); Peter Byrne (Charlotte Hall, MD); Wei Chen (Sammamish, WA); Raghavendra Thallam Kodandaramaih (Redmond, WA); Girish Mittur Venkataramanappa (Redmond, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F11/1469G06F11/1474G06F16/2365G06F16/2379G06F2201/87
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,003,549
App. No.
16/045,715
Granted
May 11, 2021
Kind
B2
Abstract

Database recovery can be performed in substantially constant time. From a database transaction log, the state of one or more transactions is identified including those that were active at a time of a crash but not committed. Transactions can be reapplied sequentially starting from the beginning of a last successful checkpoint to the end of the transaction log. Uncommitted user transactions are not undone synchronously, but simply marked as aborted. Subsequently, versions of affected data elements can be reverted back to a prior saved version asynchronously.

Claims (54)

1. A database recovery system, comprising:

a processor coupled to a memory, the processor configured to execute computer-executable instructions stored in the memory that when executed cause the processor to perform the following actions:

determining a state of one or more transactions identified in a transaction log associated with a database, wherein the database supports versioning of user data;

redoing the one or more transactions sequentially as specified by the transaction log starting from the beginning of a last successful checkpoint to the end of the transaction log;

marking one or more uncommitted transactions of the one or more transactions as aborted;

identifying a data element associated with a transaction identifier of one of the one or more uncommitted transactions marked as aborted; and

reverting the data element to a prior committed version in an asynchronous background process or when the data element is updated.

2. The system of claim 1 , wherein the actions further comprise performing a logical revert by applying compensating operations to the data element to produce the prior committed version.

3. The system of claim 1 , wherein the actions further comprise:

acquiring a secondary log that stores logical operations that are non-versioned; and

using the acquired secondary log in a database recovery procedure.

4. The system of claim 3 , wherein using the acquired secondary log in the database recovery procedure comprises:

redoing the logical operations captured by the secondary log chronologically starting from the oldest active transaction to the end of the secondary log; and

undoing uncommitted logical operations in reverse chronological order from the end of the secondary log to the oldest active transaction.

5. The system of claim 4 , wherein the actions further comprise applying a transaction lock on a transaction identifier during recovery and releasing the transaction lock after completion of the undoing uncommitted logical operations.

6. The system of claim 3 , wherein the actions further comprise truncating the secondary log based on the longest active transaction.

7. The system of claim 1 , wherein the actions further comprise truncating the transaction log based on a most recent successful checkpoint.

8. The system of claim 1 , wherein the actions further comprise redoing the transactions sequentially as specified by the transaction log starting at the earlier of an oldest dirty page or the beginning of a last successful checkpoint.

9. A method of database recovery, comprising:

employing at least one processor configured to execute computer-executable instructions stored in a memory that when executed cause the at least one processor to perform the following acts:

determining a state of transactions specified in a transaction log of a database, wherein the database stores versions of user data;

redoing one or more transactions sequentially as specified by the transaction log starting from the beginning of a last successful checkpoint to the end of the transaction log;

marking one or more uncommitted transactions of the one or more transactions as aborted;

identifying a data element associated with a transaction identifier of one of the one or more uncommitted transactions marked as aborted; and

reverting the data element to a prior committed version in an asynchronous background process or when the data element is updated.

10. The method of claim 9 , wherein the acts further comprise identifying the data element in response to receiving a request to update the data element.

11. The method of claim 9 , wherein the acts further comprise:

generating a secondary log that stores logical operations that are non-versioned; and

using the generated secondary log in a database recovery procedure.

12. The method of claim 11 , wherein using the generated secondary log in the database recovery procedure comprises:

redoing one or more transactions captured by the secondary log starting from the oldest active logical transaction; and

undoing one or more uncommitted transactions backward from the end of the secondary log to the oldest active transaction.

13. The method of claim 9 , wherein the acts further comprise truncating the transaction log based on a most recent checkpoint.

14. The method of claim 9 , wherein the acts further comprise:

identifying one or more system transactions captured in the transaction log;

redoing one or more system transactions chronologically starting from the oldest active transaction to the end of the transaction log; and

undoing one or more uncommitted system transactions in reverse chronological order from the end of the transaction log to the oldest active transaction.

15. A system of database recovery, comprising:

a processor coupled to a memory, the processor configured to execute computer-executable instructions stored in the memory that when executed cause the processor to perform the following actions:

determining state of transactions from a transaction log after a crash of a database, wherein the database supports versioning of user data;

redoing one or more transactions from a last successful checkpoint forward to the end of the transaction log;

marking one or more uncommitted transactions as aborted and deferring undo;

acquiring a secondary log that that stores logical operations that are non-versioned; and

using the acquired secondary log in a database recovery procedure.

16. The system of claim 15 , wherein the actions further comprise:

identifying data elements associated with a transaction identifier marked as aborted; and

reverting at least one of the data elements to a previous saved version.

17. The system of claim 16 , wherein using the acquired secondary log in the database recovery procedure comprises:

redoing the logical operations captured by the secondary log forward starting from the oldest active transaction to the end of the secondary log; and

undoing uncommitted logical operations backward from the end of the secondary log to the oldest active transaction.

18. The system of claim 16 , wherein the actions further comprise identifying the data elements in response to receiving a request to update the data elements.

19. The system of claim 16 , wherein the actions further comprise:

performing a logical revert by applying compensating operations to the data elements to produce the prior committed version.

20. The system of claim 15 , wherein the actions further comprise truncating the transaction log based on a most recent checkpoint.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 16, 2019
From: KODANDARAMAIH, RAGHAVENDRA THALLAM
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 049193/0784 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 26, 2018
From: ANTONOPOULOS, PANAGIOTIS; RADU, ADRIAN-LEONARD; KODAVALLA, HANUMANTHA RAO; BYRNE, PETER; CHEN, WEI; KODANDARAMAIH, RAGHAVENDRA THALLAM; VENKATARAMANAPPA, GIRISH MITTUR
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 046462/0979 →
Continuity (1)
Related Publication 20200034251A1 · Jan 30, 2020