# US 2021/0286794 A1 · Data tree checkpoint and restoration system and method

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

- Number: US 2021/0286794 A1
- Document ID: US20210286794A1
- Status: Published application
- Kind: A1
- Application number: 16/819,764
- Filed: 2020-03-16
- Published: 2021-09-16
- Earliest claimed: 2020-03-16
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Brian Hatfield; Scott Brewer
- Web page: https://patentgrep.com/patent/US20210286794A1

## CPC

- G06F 16/2246: {Trees, e.g. B+trees}
- G06F 11/1451: {by selection of backup contents}
- G06F 11/1461: {Backup scheduling policy}
- G06F 11/1469: {Backup restoration techniques}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 12/0822: {Copy directories (local copy tags for implementing a bus snooping protocol G06F12/0831)}
- G06F 16/1734: {Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs}
- G06F 16/1824: {implemented using Network-attached Storage [NAS] architecture (distributed or networked storage systems G06F3/067; protocols for distributed storage of data in a network H04L67/1097)}
- G06F 16/2308: {Concurrency control (transaction processing G06F9/466)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods for storing nodes, preferably, leaf nodes, of a data tree structure into storage are disclosed, and in one or more aspects restoring the leaf nodes from storage, preferably to memory. Copying the nodes into storage includes in an embodiment share-latching a first node of a data tree to be copied; copying the first node that is share-latched into storage; determining if there is a sibling second node linked to the first node; following a link between the first copied node and the sibling second node, share-latching the sibling second node, unlatching the first copied node, and copying the sibling second node into storage. Restoring includes copying the leaf nodes from storage, updating the leaf nodes, and creating/recreating the data tree.

## Claims

### Claim 1

A method of managing data in a data storage system comprising:
share-latching a first node of a data tree to be copied into persistent storage;
copying the first node that is share-latched into persistent storage;
determining if there is a sibling second node linked to the first node; and
in response to the presence of a sibling second node linked to the first node, following a link between the first node that was copied and the sibling second node, share-latching the sibling second node, unlatching the first node that was copied, and copying the sibling second node into persistent storage.

### Claim 2 (depends on 1)

The method of claim 1, further comprising determining if there is a sibling third node linked to the right of the sibling second node, and in response to a sibling third node linked to the sibling second node, following a link between the sibling second node and the sibling third node, share-latching the sibling third node, unlatching the sibling second node, and copying the sibling third node into persistent storage.

### Claim 3 (depends on 1)

The method of claim 1, further comprising, in response to there being no sibling node linked to a node that was copied, unlatching the node that was copied.

### Claim 4 (depends on 3)

The method of claim 3, wherein in response to there being no sibling node linked to a node that was copied, the method further comprises determining whether the method should proceed to copy an upper level of nodes into persistent storage.

### Claim 5 (depends on 4)

The method of claim 4, wherein in response to determining that the method should proceed to copy an upper level of nodes into persistent storage, copying non-leaf nodes into persistent storage.

### Claim 6 (depends on 5)

The method of claim 5, wherein pointers to nodes are copied into persistent storage.

### Claim 7 (depends on 1)

The method of claim 1, wherein each node that is copied into persistent storage contains two or more records.

### Claim 8 (depends on 1)

The method of claim 1, wherein only leaf nodes containing records are copied into persistent storage.

### Claim 9 (depends on 1)

The method of claim 1, further comprising restoring a data tree structure by copying the nodes in persistent storage into memory.

### Claim 10 (depends on 9)

The method of claim 9, wherein restoring the data tree structure comprises identifying a most recent complete checkpoint file.

### Claim 11 (depends on 10)

The method of claim 10, wherein restoring the data tree structure further comprises reading the nodes in the most recent complete checkpoint file from persistent storage and copying the nodes read from the most recent complete checkpoint file into memory.

### Claim 12 (depends on 11)

The method of claim 11, wherein restoring the data tree structure further comprises copying the nodes from the most recent complete checkpoint file in persistent storage concurrently into memory.

### Claim 13 (depends on 11)

The method of claim 11, wherein restoring the data tree structure comprises updating the nodes copied from the most recent compete checkpoint file based upon data written since the most recent complete checkpoint file finished.

### Claim 14 (depends on 13)

The method of claim 13, wherein restoring the data tree structure comprises updating the nodes read from the most recent complete checkpoint file to include data from records written and stored in a record log.

### Claim 15 (depends on 11)

The method of claim 11, further comprising setting pointers for the nodes copied from persistent storage into memory and the updated nodes.

### Claim 16

A computer program product, the computer program product embodied on one or more computer-readable media and comprising programming instructions that when executed cause a processor to:
share-latch a first node of a data tree to be copied into persistent storage;
copy the first node that is share-latched into persistent storage;
determine if there is a sibling second node linked to the right of the first node; and
in response to a sibling second node linked to the right of the first node, follow a link between the first node that was copied and the sibling second node, share-latch the sibling second node, unlatch the first node that was copied, and copy the sibling second node into persistent storage.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the computer program product further comprises programming instructions that when executed cause a processor to:
determine if there is a sibling third node linked to the right of the sibling second node, and
in response to a sibling third node linked to the right of the sibling second node:
follow a link between the sibling second node and the sibling third node,
share-latch the sibling third node,
unlatch the sibling second node, and
copy the sibling third node into persistent storage.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the computer program product further comprises programming instructions that when executed cause a processor to copy only nodes containing two or more records into persistent storage.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the computer program product further comprises programming instructions that when executed cause a processor to:
restore a data tree structure by:
identifying the most recent complete checkpoint file;
reading the nodes in the most recent complete checkpoint file from persistent storage; and
copying the nodes read from the most recent complete checkpoint file from persistent storage concurrently and directly into memory without buffering.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the computer program product further comprises programming instructions that when executed cause a processor to: restore the data tree structure by updating the checkpoint nodes read from the most recent complete checkpoint file to include data from records written and stored in a record log.
