# US 12,217,550 B1 · Tolerating server failures in a consensus protocol down to one surviving server using shared storage as a voter

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

- Number: US 12,217,550 B1
- Document ID: US12217550B1
- Status: Granted
- Kind: B1
- Application number: 18/400,999
- Filed: 2023-12-29
- Granted: 2025-02-04
- Earliest claimed: 2023-12-29
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: William H. Bridge, Jr.; Yuri Sharonin; David Brower
- Web page: https://patentgrep.com/patent/US12217550B1

## CPC

- G07C 13/00: Voting apparatus
- G06F 11/187: {Voting techniques}
- G06N 20/00: Machine learning
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04N 21/4758: {for providing answers, e.g. voting}
- G07C: TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An elector is provided using shared storage to allow a cluster of participant nodes to gracefully convert failed voters to non-voters until there are only two voters. The cluster can then tolerate the failure of either of those two remaining participant nodes. A tiny amount of shared storage is used as a voter without an object store. This results in a cluster with only one running node that is an exclusive leader. An exclusive leader is then the only participant node that is a voter, and the exclusive leader can commit log records without replicating them to any other members of the cluster. When there is an exclusive leader, there is only one remaining node with a current copy of the object store.

## Claims

### Claim 1

A method comprising:
activating an elector in a group of participant nodes, wherein:
the group of participant nodes includes a leader node and a follower node,
the leader node is configured to replicate changes to a local object store to the follower node according to a consensus protocol,
the elector comprises an elector state data structure stored in a shared storage, and
the shared storage is accessible by each node in the group of participant nodes;
in response to a request for an election for leadership of the group of participant nodes from a particular participant node from the group of participant nodes, determining, by the particular participant node, whether the particular participant node will receive a vote from the elector based on contents of the elector state data structure;
in response to determining that the particular participant node will receive the vote from the elector, modifying the elector state data structure in the shared storage based on whether the particular participant node received the vote from the elector; and
determining a new leader for the group of participant nodes based at least in part on whether the particular participant node received the vote from the elector,
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

The method of claim 1, wherein the contents of the elector state data structure comprise:
a high term representing a highest term the elector has seen,
a voted-for identifier of a member the elector last voted for, and
a log record identifier representing a log record that committed the last election the elector voted in.

### Claim 3 (depends on 2)

The method of claim 2, wherein the particular participant node determines whether the particular participant node will receive the vote from the elector based on a comparison of a current term and the high term, a comparison of a local log tail of the particular participant node and the log record identifier, and a value of the voted-for identifier.

### Claim 4 (depends on 3)

The method of claim 3, wherein modifying the elector state data structure comprises:
in response to the current term being greater than the high term, modifying the high term to be equal to the current term to form modified content.

### Claim 5 (depends on 2)

The method of claim 2, wherein modifying the elector state data structure comprises:
setting the voted-for identifier to a member identifier of the particular participant node.

### Claim 6 (depends on 1)

The method of claim 1, wherein modifying the elector state data structure comprises:
attempting to write the modified elector state data structure to the shared storage;
in response to a failure to write the modified elector state data structure to the shared storage, repeating determining whether the particular participant node will receive a vote from the elector based on contents of the elector state data structure.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining the new leader comprises determining consensus between the new leader and the elector.

### Claim 8 (depends on 1)

The method of claim 1, wherein the request for the election is initiated by the follower node in response to detecting a failure of the leader node.

### Claim 9 (depends on 1)

The method of claim 1, wherein the request for the election is initiated by the leader node in response to downgrading the follower node from a voter role to a non-voter role.

### Claim 10 (depends on 1)

The method of claim 1, further comprising designating the new leader as an exclusive leader node that commits updates with a quorum of one.

### Claim 11 (depends on 10)

The method of claim 10, wherein modifying the elector state data structure comprises storing an identifier of the new leader as an exclusive leader.

### Claim 12 (depends on 1)

The method of claim 1, wherein the shared storage provides atomic read-modify-write such that only one participant node updates the elector state data structure in the shared storage to receive a vote from the elector for the election for leadership.

### Claim 13 (depends on 1)

The method of claim 1, wherein activating the elector in the group of participant nodes comprises configuring a plurality of instances of shared storage and activating only one instance of shared storage within the plurality of instances of shared storage to participate in elections for leadership.

### Claim 14 (depends on 1)

The method of claim 1, wherein the elector acts as a voter for elections for leadership but not for committing changes to the object store.

### Claim 15 (depends on 1)

The method of claim 1, further comprising:
in response to adding a second follower node to the group of participant nodes, deactivating the elector.

### Claim 16

One or more non-transitory storage media storing instructions which, when executed by one or more computing devices, cause:
activating an elector in a group of participant nodes, wherein:
the group of participant nodes includes a leader node and a follower node,
the leader node is configured to replicate changes to a local object store to the follower node according to a consensus protocol,
the elector comprises an elector state data structure stored in a shared storage, and
the shared storage is accessible by each node in the group of participant nodes;
in response to a request for an election for leadership of the group of participant nodes from a particular participant node from the group of participant nodes, determining, by the particular participant node, whether the particular participant node will receive a vote from the elector based on contents of the elector state data structure;
in response to determining that the particular participant node will receive the vote from the elector, modifying the elector state data structure in the shared storage based on whether the particular participant node received the vote from the elector; and
determining a new leader for the group of participant nodes based at least in part on whether the particular participant node received the vote from the elector.

### Claim 17 (depends on 16)

The one or more non-transitory storage media of claim 16, wherein the contents of the elector state data structure comprise:
a high term representing a highest term the elector has seen,
a voted-for identifier of a member the elector last voted for, and
a log record identifier representing a log record that committed the last election the elector voted in.

### Claim 18 (depends on 17)

The one or more non-transitory storage media of claim 17, wherein the particular participant node determines whether the particular participant node will receive the vote from the elector based on a comparison of a current term and the high term, a comparison of a local log tail of the particular participant node and the log record identifier, and a value of the voted-for identifier.

### Claim 19 (depends on 18)

The one or more non-transitory storage media of claim 18, wherein modifying the elector state data structure comprises:
in response to the current term being greater than the high term, modifying the high term to be equal to the current term to form modified content.

### Claim 20 (depends on 17)

The one or more non-transitory storage media of claim 17, wherein modifying the elector state data structure comprises:
setting the voted-for identifier to a member identifier of the particular participant node.
