# US 2017/0364273 A1 · Consensus protocol enhancements for supporting flexible durability options

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

- Number: US 2017/0364273 A1
- Document ID: US20170364273A1
- Status: Published application
- Kind: A1
- Application number: 15/184,054
- Filed: 2016-06-16
- Published: 2017-12-21
- Earliest claimed: 2016-06-16
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Ivan Schreter
- Web page: https://patentgrep.com/patent/US20170364273A1

## CPC

- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 3/0617: {in relation to availability}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/065: {Replication mechanisms}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A cluster of nodes can receive a request to perform a logging operation of a distributed data storage application. The logging operation can include writing of data to a secondary storage of each of the nodes of the plurality of nodes. The request can include an indication of a durability mode to use for the logging operation. The logging operation can be initiated at each node of the plurality of nodes according to the indication of the durability mode, a completion callback can be run at each node of the plurality of nodes according to the indication of the durability mode, a global durability state and a global commit state can be determined for the cluster, and a reply can be returned to the request once the global durability state and global commit state are consistent with the indication of the durability mode to be used for the logging operation.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving, at a cluster of nodes implementing a distributed data storage application, a request to perform a logging operation of the distributed data storage application, the logging operation comprising writing of data to a secondary storage of each of the nodes of the plurality of nodes, the request comprising an indication of a durability mode to use for the logging operation;
initiating the logging operation at each node of the plurality of nodes according to the indication of the durability mode;
running a completion callback at each node of the plurality of nodes according to the indication of the durability mode;
determining a global durability state and a global commit state for the cluster; and
returning a reply to the request once the global durability state and the global commit state are consistent with the indication of the durability mode to be used for the logging operation.

### Claim 2 (depends on 1)

A computer-implemented method as in claim 1, wherein, when the indication is for an immediate durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback as soon as the writing is completed, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes have replied run the completion callback.

### Claim 3 (depends on 1)

A computer-implemented method as in claim 1, wherein, when the indication is for a replicated delayed durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node, and running the completion callback as soon as data are written to a log buffer but not yet to a secondary storage of that node, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes have written to the log buffer.

### Claim 4 (depends on 1)

A computer-implemented method as in claim 1, wherein, when the indication is for a replicated relaxed durability mode, the initiating comprises each node of the plurality of nodes not immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback immediately, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes commenced writing to the log buffer.

### Claim 5 (depends on 1)

A computer-implemented method as in claim 1, wherein, when the indication is for a delayed durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node, and running the completion callback as soon as data are written to the log buffer but not yet to the secondary storage of that node, and wherein the returning of the reply comprises waiting only until the data are written to the log buffer on a leader node of the plurality of nodes.

### Claim 6 (depends on 1)

A computer-implemented method as in claim 1, wherein, when the indication is for a relaxed durability mode, the initiating comprises each node of the plurality of nodes not immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback immediately, and wherein the returning of the reply comprises waiting until the data is written to a log buffer on the leader node only.

### Claim 7 (depends on 1)

A computer implemented method as in claim 1, wherein the request further comprises a destination of the data to be logged and a type of callback requested.

### Claim 8 (depends on 1)

A computer implemented method as in claim 1, wherein the determining of the global durability state comprises establishing a consensus among the nodes in the cluster regarding whether a quorum of the nodes in the cluster have achieved a durability state specified in the indication of the durability mode.

### Claim 9

A system comprising:
computer hardware configured to perform operations comprising:
receiving, at a cluster of nodes implementing a distributed data storage application, a request to perform a logging operation of the distributed data storage application, the logging operation comprising writing of data to a secondary storage of each of the nodes of the plurality of nodes, the request comprising an indication of a durability mode to use for the logging operation;
initiating the logging operation at each node of the plurality of nodes according to the indication of the durability mode;
running a completion callback at each node of the plurality of nodes according to the indication of the durability mode;
determining a global durability state and a global commit state for the cluster; and
returning a reply to the request once the global durability state and the global commit state are consistent with the indication of the durability mode to be used for the logging operation.

### Claim 10 (depends on 9)

A system as in claim 9, wherein, when the indication is for an immediate durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback as soon as the writing is completed, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes have replied run the completion callback.

### Claim 11 (depends on 9)

A system as in claim 9, wherein, when the indication is for a replicated delayed durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node, and running the completion callback as soon as data are written to a log buffer but not yet to a secondary storage of that node, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes have written to the log buffer.

### Claim 12 (depends on 9)

A system as in claim 9, wherein, when the indication is for a relaxed durability mode, the initiating comprises each node of the plurality of nodes not immediately writing a log buffer containing data to the secondary storage and running the completion callback immediately, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes commenced writing to the log buffer.

### Claim 13 (depends on 9)

A system as in claim 9, wherein, when the indication is for a delayed durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node, and running the completion callback as soon as data are written to the log buffer but not yet to the secondary storage of that node, and wherein the returning of the reply comprises waiting only until the data are written to the log buffer on a leader node of the plurality of nodes.

### Claim 14 (depends on 9)

A system as in claim 9, wherein, when the indication is for a relaxed durability mode, the initiating comprises each node of the plurality of nodes not immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback immediately, and wherein the returning of the reply comprises waiting until the data is written to a log buffer on the leader node only.

### Claim 15

A computer program product comprising a non-transitory machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
receiving, at a cluster of nodes implementing a distributed data storage application, a request to perform a logging operation of the distributed data storage application, the logging operation comprising writing of data to a secondary storage of each of the nodes of the plurality of nodes, the request comprising an indication of a durability mode to use for the logging operation;
initiating the logging operation at each node of the plurality of nodes according to the indication of the durability mode;
running a completion callback at each node of the plurality of nodes according to the indication of the durability mode;
determining a global durability state and a global commit state for the cluster; and
returning a reply to the request once the global durability state and the global commit state are consistent with the indication of the durability mode to be used for the logging operation.

### Claim 16 (depends on 15)

A computer program product as in claim 15, wherein, when the indication is for an immediate durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback as soon as the writing is completed, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes have replied run the completion callback.

### Claim 17 (depends on 15)

A computer program product as in claim 15, wherein, when the indication is for a replicated delayed durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node, and running the completion callback as soon as data are written to a log buffer but not yet to a secondary storage of that node, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes have written to the log buffer.

### Claim 18 (depends on 15)

A computer program product as in claim 15, wherein, when the indication is for a relaxed durability mode, the initiating comprises each node of the plurality of nodes not immediately writing a log buffer containing data to the secondary storage and running the completion callback immediately, and wherein the returning of the reply comprises waiting until the global durability index and the global commit index reflect that a quorum of the nodes commenced writing to the log buffer.

### Claim 19 (depends on 15)

A computer program product as in claim 15, wherein, when the indication is for a delayed durability mode, the initiating comprises each node of the plurality of nodes immediately writing a log buffer containing data to the secondary storage of that node, and running the completion callback as soon as data are written to the log buffer but not yet to the secondary storage of that node, and wherein the returning of the reply comprises waiting only until the data are written to the log buffer on a leader node of the plurality of nodes.

### Claim 20 (depends on 15)

A computer program product as in claim 15, wherein, when the indication is for a relaxed durability mode, the initiating comprises each node of the plurality of nodes not immediately writing a log buffer containing data to the secondary storage of that node and running the completion callback immediately, and wherein the returning of the reply comprises waiting until the data is written to a log buffer on the leader node only.
