IP Library › Granted Patent US 11,822,436
Granted Patent B2
US 11,822,436 · App. 17/547,423 · Granted Nov 21, 2023

Database recovery based on logical timestamp

Inventor: Changgyoo Park (Seoul, KR)
Assignee: SAP SE
G06F11/1469G06F11/1471G06F16/2379
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,822,436
App. No.
17/547,423
Granted
Nov 21, 2023
Kind
B2
Abstract

A system includes reception of a request for recovery of a database to a recovery time, determination of a recovery logical timestamp corresponding to the recovery time, identification of database log records associated with a logical timestamp preceding the recovery logical timestamp, application of the identified database log records to the database sequentially according to log sequence number, identification, after applying the identified database log records, of one or more open transactions on the database, identification of a first one or more of the one or more open transactions which are associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp, and, in response to identification of the first one or more of the one or more open transactions, committing of the first one or more of the one or more open transactions.

Claims (56)

1. A system comprising:

a first at least one processing unit; and

a first non-transitory computer-readable medium storing program code that, when executed by the first at least one processing unit, causes the first at least one processing unit to perform operations comprising:

determining a recovery logical timestamp corresponding to a recovery time;

identifying database log records associated with a logical timestamp preceding the recovery logical timestamp;

applying the identified database log records to the database sequentially;

identifying one or more open transactions;

identifying a first one or more of the one or more open transactions which are associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

identifying a second one or more of the one or more open transactions which are not associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

rolling back the second one or more of the one or more open transactions; and

committing the first one or more of the one or more open transactions.

2. The system according to claim 1 , further comprising:

a second at least one processing unit; and

a second non-transitory computer-readable medium storing second program code that, when executed by the second at least one processing unit, causes the second at least one processing unit to perform operations comprising:

identifying database log records of a second database node associated with a logical timestamp preceding the recovery logical timestamp;

applying the identified database log records of the second database node to the second database node sequentially;

identifying a second one or more open transactions of the second database node;

identifying a first one or more of the second one or more open transactions which are associated with a commit log record of the second database node associated with a logical timestamp preceding the recovery logical timestamp;

identifying a second one or more of the second one or more open transactions which are not associated with a commit log record of the second database node associated with a logical timestamp preceding the recovery logical timestamp;

rolling back the second one or more of the second one or more open transactions; and

committing the first one or more of the second one or more open transactions to the second database node.

3. A computer-implemented method, comprising:

receiving a request for recovery of a database to a recovery time;

determining a recovery logical timestamp corresponding to the recovery time;

identifying database log records associated with a logical timestamp preceding the recovery logical timestamp;

applying the identified database log records to the database sequentially according to log sequence number;

after applying the identified database log records, identifying one or more open transactions on the database;

identifying a first one or more of the one or more open transactions which are associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

identifying a second one or more of the one or more open transactions which are not associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

rolling back the second one or more of the one or more open transactions; and

committing the first one or more of the one or more open transactions.

4. The method according to claim 3 , further comprising:

receiving the logical timestamp at a second database node;

identifying database log records of the second database node associated with a logical timestamp preceding than the recovery logical timestamp;

applying the identified database log records of the second database node to the second database node sequentially according to log sequence number of the second database node;

identifying a second one or more open transactions of the second database node;

identifying a first one or more of the second one or more open transactions which are associated with a commit log record of the second database node associated with a logical timestamp preceding the recovery logical timestamp;

identifying a second one or more of the second one or more open transactions which are not associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

rolling back the second one or more of the second one or more open transactions; and

committing the first one or more of the second one or more open transactions to the second database node.

5. A non-transitory computer-readable medium storing program code that, when executed by at least one processing unit, causes the at least one processing unit to perform operations comprising:

identifying database log records associated with a logical timestamp preceding a recovery logical timestamp;

applying the identified database log records to the database sequentially according to log sequence number;

after applying the identified database log records, identifying one or more open transactions on the database;

identifying a first one or more of the one or more open transactions which are associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

identifying a second one or more of the one or more open transactions which are not associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

rolling back the second one or more of the one or more open transactions; and

committing the first one or more of the one or more open transactions.

6. The medium according to claim 5 , the program code, when executed by at least one processing unit, causes the at least one processing unit to perform operations comprising:

identifying database log records of a second database node associated with a logical timestamp preceding than the recovery logical timestamp;

applying the identified database log records of the second database node to the second database node sequentially according to log sequence number of the second database node;

identifying a second one or more open transactions of the second database node;

identifying a first one or more of the second one or more open transactions which are associated with a commit log record of the second database node associated with a logical timestamp preceding the recovery logical timestamp;

identifying a second one or more of the second one or more open transactions which are not associated with a commit log record associated with a logical timestamp preceding the recovery logical timestamp;

rolling back the second one or more of the second one or more open transactions; and

committing the first one or more of the second one or more open transactions to the second database node.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 10, 2021
From: PARK, CHANGGYOO
To: SAP SE
Reel/Frame 058357/0001 →
Continuity (1)
Related Publication 20230185676A1 · Jun 15, 2023