# US 9,519,551 B2 · Recovery processing for database in persistent system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,519,551 B2
- Document ID: US9519551B2
- Status: Granted
- Kind: B2
- Application number: 13/892,150
- Filed: 2013-05-10
- Published: 2014-10-02
- Granted: 2016-12-13
- Earliest claimed: 2013-03-28
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Per-Ake Larson; Robert Patrick Fitzgerald; Cristian Diaconu; Michael James Zwilling
- Web page: https://patentgrep.com/patent/US9519551B2

## CPC

- G06F 11/1471: involving logging of persistent data for recovery
- G06F 9/466: {Transaction processing}
- G06F 9/467: {Transactional memory (G06F9/528 takes precedence)}
- G06F 11/1458: {Management of the backup or restore process}
- G06F 11/1469: {Backup restoration techniques}
- G06F 16/1873: {Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files}
- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 16/2322: {using timestamps}
- G06F 16/2329: {using versioning}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 11/1438: {Restarting or rejuvenating}
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The recovery of one or more transactions in a computing system in which one or more persistent systems are coupled via a bus to one or more processors. As an example, the persistent system may serve as at least part of the main memory of the computing system. The transaction might implement multi-versioning in which a record is not updated in place. Rather, each record is represented as a sequence of one or more record versions, each version having a valid interval during which the record version is considered to properly represent the record.

## Claims

### Claim 1

A method for recovering a transaction in a computing system that includes a persistent system coupled to one or more processors via a bus, the method comprising:
an act of identifying a log buffer in the persistent system, the log buffer containing post-commit processing information that is persisted in the persistent system and that corresponds to a transaction and that includes both a commit marker and a pointer reference for each of a plurality of different written record versions that are also persisted in the persistent system;
an act of identifying each written record version of the plurality of different written record versions that is created or updated by the transaction using the post-commit processing information;
for each written record version that is created or updated by the transaction, an act of updating a valid interval of said each written record using the commit marker of the post-commit processing information;
providing the updated valid interval to the persistent system; and
issuing a persist command to the persistent system, subsequent to providing the updated valid interval to the persistent system, which causes data provided to the persistent system and that is temporarily maintained in a buffer of the persistent system to be persisted, thereby further facilitating making the updated valid interval durable.

### Claim 2 (depends on 1)

The method in accordance with claim 1, wherein the act of updating the valid interval comprises:
for each record version that is created by the transaction, an act of updating a valid interval begin boundary using the commit marker.

### Claim 3 (depends on 1)

The method in accordance with claim 1, wherein the act of updating the valid interval comprises:
for each record version that is updated by the transaction, an act of updating a valid interval end boundary using the commit marker.

### Claim 4 (depends on 1)

The method in accordance with claim 1, wherein the act of identifying the log buffer in the persistent system comprises:
an act of identifying the log buffer being marked as complete within the persistent system; and
an act of identifying the transaction using the post-commit processing information within the log buffer.

### Claim 5

A computer program product comprising one or more computer-readable storage media having thereon computer-executable instructions that are executable by one or more processors of a computing system to cause the computing system to implement the following as part of a recovery:
identify one or more log buffers that are marked as being complete in the persistent system, each of the one or more log buffers being marked as complete including post-commit processing information for each of a plurality of different written record versions that are also persisted in the persistent system; and
for each of the one or more identified complete log buffers, use post-commit processing information included within the log buffer to:
identify each written record version of the plurality of different written record versions that is created or updated by a transaction using the post-commit processing information, the post-commit processing information including both a commit marker and a pointer reference for each of the written record versions;
for each written record version that is created or updated by the transaction, update a valid interval of said each written record version by using a commit marker of the post-commit processing information;
providing the updated valid interval to the persistent system; and
issuing a persist command to the persistent system, subsequent to providing the updated valid interval to the persistent system, which causes data provided to the persistent system and that is temporarily maintained in a buffer of the persistent system to be persisted, thereby further facilitating making the updated valid interval durable.

### Claim 6 (depends on 5)

The computer program product in accordance with claim 5, wherein the computer-executable instructions are further configured to cause the computing system to:
identify one or more log buffers that are not marked as being complete in the persistent system; and
for each of the one or more identified log buffers that are not identified as being complete in the persistent system, free the log buffer so that it is available to be associated with another transaction.

### Claim 7 (depends on 6)

The computer program product in accordance with claim 6, wherein the computer-executable instructions are further configured to cause the computing system to:
set a state of the log buffer to represent that the log buffer is available to be associated with another transaction; and
provide the state that represents that the log buffer is available to the persistent memory.

### Claim 8 (depends on 7)

The computer program product in accordance with claim 7, wherein the computer-executable instructions are further configured to cause the computing system to:
confirm that the state that represents that the log buffer is available has been persisted in the persistent system.

### Claim 9 (depends on 5)

The computer program product in accordance with claim 5, wherein the computer-executable instructions are further configured to cause the computing system to, for each of the one or more identified complete log buffers, free the corresponding log buffer so that it is available to be associated with another transaction after the valid interval is updated.

### Claim 10 (depends on 9)

The computer program product in accordance with claim 9, wherein the computer-executable instructions are further configured to cause the computing system to recover the database to a valid state after the log buffers for each of the one or more identified complete log buffers are freed.

### Claim 11 (depends on 9)

The computer program product in accordance with claim 9, wherein the computer-executable instructions are further configured to cause the computing system to recover the database to the valid state by causing the computing system to:
locate all record versions that are currently valid;
locate empty record slots; and
rebuild indexes of the database.

### Claim 12 (depends on 11)

The computer program product in accordance with claim 11, wherein the computer-executable instructions are further configured to cause the computing system to rebuild the indexes by causing the computing system, for each of at least some portions corresponding to a database in the persistent system, to:
access a valid interval begin boundary for the memory portion;
use the valid interval begin boundary to identify that the memory portion contains at least a portion of a record version that is not part of a transaction; and
add the memory portion to a free list.

### Claim 13 (depends on 11)

The computer program product in accordance with claim 11, wherein the computer-executable instructions are further configured to cause the computing system to rebuild the indexes by causing the computing system, for each of at least some portions corresponding to a database in the persistent system, to:
access a valid interval begin boundary for the memory portion;
use the valid interval begin boundary to identify that the memory portion contains at least a portion of a record version that was created by an uncommitted transaction;
modify the memory portion so that the memory portion is considered to be free; and
add the memory portion to a free list.

### Claim 14 (depends on 11)

The computer program product in accordance with claim 11, wherein the computer-executable instructions are further configured to cause the computing system to rebuild the indexes by causing the computing system, for each of at least some portions corresponding to a database in the persistent system, to:
access a valid interval begin boundary for the memory portion;
use the valid interval begin boundary to identify that the valid interval end boundary should be accessed for further evaluation; and
access a valid interval end boundary for the memory portion.

### Claim 15 (depends on 14)

The computer program product in accordance with claim 14, wherein the computer-executable instructions are further configured to cause the computing system to:
use the valid interval end boundary for the memory portion to identify that the memory portion includes at least a portion of a particular record version that is current; and
identify which table of the database the current record version belongs to; and
add the current record version to the identified table.

### Claim 16 (depends on 14)

The computer program product in accordance with claim 14, wherein the computer-executable instructions are further configured to cause the computing system to:
use the valid interface end boundary for the memory portion to identify that the memory portion includes at least a portion of a particular record version; and
identify that the particular record version belongs to an uncommitted transaction that attempted to update the particular record version;
modify the memory portion so that the particular record version is again a current record version;
identify which table of the database the particular record version belongs to; and
add the particular record version to the identified table.

### Claim 17 (depends on 14)

The computer program product in accordance with claim 14, wherein the computer-executable instructions are further configured to cause the computing system to:
use the valid interface end boundary for the memory portion to identify that the memory portion includes at least a portion of a record version deleted by a committed transaction; and
add the memory portion to a free list.

### Claim 18 (depends on 9)

The computer program product in accordance with claim 9, wherein the computer-executable instructions are further configured to cause the computing system free the log buffer by causing the computing system to:
set a state of the log buffer to represent that the log buffer is available to be associated with another transaction; and
provide the state that represents that the log buffer is available to the persistent memory.

### Claim 19 (depends on 18)

The computer program product in accordance with claim 18, wherein the computer-executable instructions are further configured to cause the computing system to free the log buffer by causing the computing system to:
confirm that the state that represents that the log buffer is available has been persisted in the persistent system.

### Claim 20 (depends on 5)

The computer program product in accordance with claim 5, wherein the computer-executable instructions are further configured to cause the computing system to update the valid interval by causing the computing system, for each at least some of the one or more identified complete log buffers, to:
for each record version that is created by the transaction, update a valid interval beginning boundary using the commit marker.

### Claim 21 (depends on 5)

The computer program product in accordance with claim 5, wherein the computer-executable instructions are further configured to cause the computing system to update the valid interval by causing the computing system, for each at least some of the one or more identified complete log buffers, to:
for each record version that is updated by the transaction, update a valid interval end boundary using the commit marker.

### Claim 22

A system comprising:
one or more processors;
a persistent system capable of persisting data;
a bus coupling the one or processors to the persistent system, wherein the persistent system has an addressing system that is addressable by the one or more processors via the system bus; and
a recovery system configured to communicate over the bus with the persistent system to implement a recovery by performing the following:
an act of identifying one or more log buffers that are marked as being complete in the persistent system each of the one or more log buffers being marked as complete including post-commit processing information for each of a plurality of different written record versions that are also persisted in the persistent system; and
for each of the one or more identified complete log buffers, performing the following using post-commit processing information included within the log buffer to:
identify each written record version of the plurality of different written record versions that is created or updated by a transaction using the post-commit processing information, the post-commit processing information including both a commit marker and a pointer reference for each of the written record versions;
for each written record version that is created or updated by the transaction, update a valid interval of said each written record version by using a commit marker of the post-commit processing information;
providing the updated valid interval to the persistent system; and
issuing a persist command to the persistent system, subsequent to providing the updated valid interval to the persistent system, which causes data provided to the persistent system and that is temporarily maintained in a buffer of the persistent system to be persisted, thereby further facilitating making the updated valid interval durable.

### Claim 23 (depends on 22)

The computing system of claim 22, wherein the recovery system is further configured to perform the following:
change a state of the log buffer to reflect the log buffer is free;
provide a changed state of the log buffer to the persistent system, subsequent to changing the state of the log buffer to reflect the log buffer is free; and
confirm that the changed state of the log buffer has been persisted at the persistent system, subsequent to providing the changed state to the persistent system, by issuing a persist command to the persistent system which causes data provided to the persistent system and that is temporarily maintained in a buffer of the persistent system to be persisted, thereby facilitating making the changed state of the log buffer durable.
