# US 11,119,845 B2 · Techniques for scheduled anti-entropy repair design

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

- Number: US 11,119,845 B2
- Document ID: US11119845B2
- Status: Granted
- Kind: B2
- Application number: 16/367,069
- Filed: 2019-03-27
- Published: 2019-10-03
- Granted: 2021-09-14
- Earliest claimed: 2018-03-27
- Assignees: Netflix, Inc.
- Applicants: Netflix, Inc.
- Inventors: Vinay Chella; Joseph Lynch; Ajay Upadhyay
- Web page: https://patentgrep.com/patent/US11119845B2

## CPC

- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 11/0709: {in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems}
- G06F 11/0751: {Error or fault detection not based on redundancy (power supply failures G06F1/30; network fault management H04L41/06)}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/273: {Asynchronous replication or reconciliation}
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Various embodiments of the invention disclosed herein provide techniques for performing distributed anti-entropy repair procedures across a plurality of nodes in a distributed database network. A node included in a plurality of nodes within the distributed database network determines, before all other nodes included in the plurality of nodes, that a first anti-entropy repair procedure has ended. The node determines that a second anti-entropy repair procedure is ready to begin. The node generates a schedule for executing one or more operations associated with the second anti-entropy repair procedure. The node writes the schedule to a shared repair schedule data structure to initiate the second anti-entropy repair procedure across multiple nodes included in the plurality of nodes. Each of the nodes included in the plurality of nodes then performs a node repair based on the schedule.

## Claims

### Claim 1

A computer-implemented method, comprising:
determining, by a first node included in a plurality of nodes and before all other nodes included in the plurality of nodes, that a first anti-entropy repair procedure has ended;
determining, by the first node, that a second anti-entropy repair procedure is ready to begin;
generating a first schedule for executing one or more operations associated with the second anti-entropy repair procedure, wherein the first schedule comprises a sequence in which one or more node repairs are performed by multiple nodes included in the plurality of nodes during the second anti-entropy repair procedure; and
writing the first schedule to a shared repair schedule data structure to initiate the second anti-entropy repair procedure across the multiple nodes included in the plurality of nodes.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein determining that the second anti-entropy repair procedure is ready to begin comprises determining that a current time is within a specified range of time designated for repair operations.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining, by a second node included in the plurality of nodes, that a third anti-entropy repair procedure is ready to begin;
generating a second schedule for executing one or more operations associated with the third anti-entropy repair procedure; and
writing the second schedule to a second shared repair schedule data structure to initiate the third anti-entropy repair procedure across multiple nodes included in the plurality of nodes.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein:
the second anti-entropy repair procedure comprises a full anti-entropy repair procedure,
the third anti-entropy repair procedure comprises an incremental anti-entropy repair procedure, and
determining that the third anti-entropy repair procedure is ready to begin comprises determining that a fourth anti-entropy repair procedure that comprises an incremental repair has ended.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining, by a second node included in the plurality of nodes, that the second anti-entropy repair procedure is in progress;
determining that the second node is next in the sequence to be repaired; and
repairing at least one inconsistent data partition that resides on the second node.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining, by a second node included in the plurality of nodes, that the second anti-entropy repair procedure is in progress;
determining that the second node is independent from all other nodes included in the plurality of nodes that are currently performing a node repair associated with the second anti-entropy repair procedure; and
repairing at least one inconsistent data partition that resides on the second node.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining, by a second node included in the plurality of nodes, that the second anti-entropy repair procedure is in progress;
determining that the second node has performed a node repair associated with the second anti-entropy repair procedure;
determining that all other nodes included in the plurality of nodes that are interdependent with the second node have performed one or more additional node repairs associated with the second anti-entropy repair procedure; and
performing, by the second node, a post-repair procedure associated with the second anti-entropy repair procedure.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein performing the post-repair procedure comprises deleting a partition that is no longer needed after the second anti-entropy repair procedure is complete.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, wherein performing the post-repair procedure comprises performing a compaction operation on one or more partitions associated with the second node to reduce latency when accessing the one or more partitions.

### Claim 10 (depends on 7)

The computer-implemented method of claim 7, wherein performing the post-repair procedure comprises transmitting a message to a monitoring application indicating that the second node has performed the node repair associated with the second anti-entropy repair procedure.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining that a number of partitions associated with the second anti-entropy repair procedure exceeds a threshold level; and
dividing work associated with the second anti-entropy repair procedure into a plurality of subranges.

### Claim 12 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining that a size of one or more partitions associated with the second anti-entropy repair procedure exceeds a threshold level; and
dividing work associated with the second anti-entropy repair procedure into a plurality of subranges.

### Claim 13 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining that a completion time for the second anti-entropy repair procedure exceeds a threshold level; and
dividing work associated with the second anti-entropy repair procedure into a plurality of subranges based on the completion time.

### Claim 14

One or more non-transitory computer-readable storage media including instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of:
determining that a first anti-entropy repair procedure has ended;
determining, by a first node included in a plurality of nodes and before all other nodes included in the plurality of nodes, that a second anti-entropy repair procedure is ready to begin;
generating a schedule for executing operations associated with the second anti-entropy repair procedure, wherein the schedule comprises a sequence in which one or more node repairs are performed by multiple nodes included in the plurality of nodes during the second anti-entropy repair procedure; and
writing the schedule to a shared repair schedule data structure to initiate the second anti-entropy repair procedure across multiple nodes included in the plurality of nodes.

### Claim 15 (depends on 14)

The one or more non-transitory computer-readable storage media of claim 14, wherein determining that the second anti-entropy repair procedure is ready to begin comprises determining that a current time is within a specified range of time designated for repair operations.

### Claim 16 (depends on 14)

The one or more non-transitory computer-readable storage media of claim 14, wherein each node included in the plurality of nodes sequentially performs a node repair associated with the second anti-entropy repair procedure.

### Claim 17 (depends on 14)

The one or more non-transitory computer-readable storage media of claim 14, wherein:
each node included a first subset of nodes included in the plurality of nodes performs a first node repair associated with the second anti-entropy repair procedure in parallel with each other;
each node included in a second subset of nodes included in the plurality of nodes performs a second node repair associated with the second anti-entropy repair procedure in parallel with each other; and
the nodes included in the first subset of nodes perform the first node repair associated with the second anti-entropy repair procedure sequentially to the second node repair performed by the nodes included in the second subset of nodes.

### Claim 18 (depends on 14)

The one or more non-transitory computer-readable storage media of claim 14, wherein each node included in the plurality of nodes performs a node repair associated with the second anti-entropy repair procedure in parallel with each other.

### Claim 19

A computing device, comprising:
a memory that includes instructions; and
a processor that is coupled to the memory and, when executing the instructions, is configured to:
determine that a first anti-entropy repair procedure has ended;
determine, by a first node included in a plurality of nodes and before all other nodes included in the plurality of nodes, that a second anti-entropy repair procedure is ready to begin;
generate a repair schedule associated with the second anti-entropy repair procedure, wherein the repair schedule comprises a sequence in which one or more node repairs are performed by multiple nodes included in the plurality of nodes during the second anti-entropy repair procedure; and
write the repair schedule to a data store to initiate the second anti-entropy repair procedure across multiple nodes included in the plurality of nodes.

### Claim 20 (depends on 19)

The computing device of claim 19, wherein the processor, when executing the instructions, is further configured to assign, at a second node included in the plurality of nodes, a number of processing cores to perform a node repair associated with the second anti-entropy repair procedure, wherein the number of processing cores is a maximum of one-half a number of available processor cores within the second node.
