# US 10,503,725 B2 · Decentralized distributed database consistency

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

- Number: US 10,503,725 B2
- Document ID: US10503725B2
- Status: Granted
- Kind: B2
- Application number: 15/373,240
- Filed: 2016-12-08
- Published: 2018-04-19
- Granted: 2019-12-10
- Earliest claimed: 2016-10-13
- Assignees: Futurewei Technologies, Inc.
- Applicants: Futurewei Technologies, Inc.
- Inventors: Mason Sharp
- Web page: https://patentgrep.com/patent/US10503725B2

## CPC

- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 9/46: Multiprogramming arrangements
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for maintaining consistency in distributed databases includes receiving, by a coordinator from an application server, a transaction initiation message for a transaction. Additionally, the method includes determining whether to generate a distributed transaction identifier (DXID) for the transaction, including determining whether the transaction will be performed on a single data node or on multiple data nodes, determining to generate the DXID in response to determining that the transaction will be performed on the multiple data nodes, and generating, by the coordinator, the DXID corresponding to the transaction in response to determining to generate the DXID for the transaction. The method also includes sending, by the coordinator directly to a first data node, the DXID, sending, by the coordinator directly to a second data node, the DXID, and performing the transaction using the DXID.

## Claims

### Claim 1

A method for maintaining consistency in distributed databases, comprising:
generating, by a coordinator, a distributed transaction identifier (DXID) for a transaction initiated from an application server;
sending, by the coordinator, the DXID to a first data node and a second data node;
receiving, by the coordinator, a respective local database snapshot from each data node indicating active transactions at each data node, each local database snapshot comprising a list of active DXIDs including the DIXD for the transaction to the respective node;
generating, by the coordinator, a combined global list of DXIDs from the list of active DXIDs received from each data node;
sending, by the coordinator, the combined global list of DXIDs to each data node, prompting each data node to update the local database snapshot to include transactions not yet committed on other nodes; and
sending, by the coordinator, transaction results to the application server.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
sending, by the coordinator, transaction initiation messages to the first data node and the second data node.

### Claim 3 (depends on 1)

The method of claim 1, further comprising generating the DXID based on determining that the transaction is a write transaction.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving, by the coordinator, a first DXID list from the first data node and a second DXID list from the second data node, the first DXID list listing a first set of DXIDs active on the first data node, and the second DXID list listing a second set of DXIDs active on the second data node; and
transmitting, by the coordinator, a global DXID list to both the first data node and the second data node, the global DXID list indicating that the first set of DXIDs are active on the first data node and that the second set of DXIDs are active on the second data node.

### Claim 5 (depends on 1)

The method of claim 1, further comprising :
determining that the DXID does not already exist for the transaction, the DXID being generated in response to determining that the DXID does not already exist for the transaction.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
sending, by the coordinator, a first operation request to the first data node and a second operation request to the second data node;
receiving, by the coordinator, a first operation result from the first data node and a second operation result from the second data node; and
sending, by the coordinator, the first operation result and the second operation result to an application server.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
sending, by the coordinator, a transaction response message to the application server; and
receiving, by the coordinator, an operation command message from the application server.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving, by the coordinator, a transaction commit message for the transaction from an application server;
performing a two phase commit in response to receiving the transaction commit message; and
sending, by the coordinator, transaction results to the application server.

### Claim 9 (depends on 8)

The method of claim 8, wherein performing the two phase commit comprises:
sending, by the coordinator, a first transaction prepare message to the first data node and a second transaction prepare message to the second data node;
receiving, by the coordinator, a first transaction prepare result from the first data node and a second transaction prepare result from the second data node;
sending, by the coordinator, a first commit prepare message to the first data node and a second commit prepare message to the second data node; and
receiving, by the coordinator, a first commit result from the first data node and a second commit result from the second data node.

### Claim 10

A coordinator for maintaining consistency in distributed databases, comprising:
a non-transitory memory storage comprising instructions; and
one or more processors in communication with the non-transitory memory storage, wherein the one or more processors execute the instructions to:
generate a distributed transaction identifier (DXID) for a transaction initiated from an application server;
send the DXID to multiple data nodes;
receive a respective local database snapshot from each data node indicating active transactions at each data node, each local database snapshot comprising a list of active DXIDs including the DXID for the transaction to the respective node;
generate a combined global list of DXIDs from the list of active DXIDs received from each data node;
send the combined global list of DXIDs to each data node, prompting each data node to update the local database snapshot to include transactions not yet committed on other nodes; and
send transaction results to the application server.

### Claim 11

A method for maintaining consistency in distributed databases, comprising:
receiving, by a data node in a distributed database, a distributed transaction identifier (DXID) for a transaction from a distributed coordinator;
sending, by the data node, a local database snapshot to the distributed coordinator indicating active transactions at the data node, the local database snapshot comprising a list of active DXIDs including the DXID for the transaction;
receiving, by the data node, a combined global list of DXIDs from the distributed coordinator comprising a combined list of active DXIDs from active data nodes in the distributed database; and
updating, by the data node, the local database snapshot to include transactions not yet committed by the active data nodes.

### Claim 12 (depends on 11)

The method of claim 11, further comprising receiving, by the data node, an operation initiating message instructing the data node to operate on the transaction.

### Claim 13 (depends on 11)

The method of claim 11, wherein receiving the DXID for the transaction comprises receiving the DXID for the transaction, and based thereon, generating, by the data node, a local transaction ID (LXID), the method further comprising mapping, by the data node, the DXID to the LXID.

### Claim 14 (depends on 11)

The method of claim 11, further comprising sending, by the data node, commit results to the distributed coordinator.

### Claim 15 (depends on 1)

The method of claim 1, further comprising assigning, by the coordinator, a first operation and a second operation, respectively, to the first data node and the second data node, the assigning based on resource requirements of each operation and available resources at each node.

### Claim 16 (depends on 10)

The coordinator of claim 10, wherein the one or more processors execute the instructions to assign a first operation and a second operation, respectively, to a first data node and a second data node of the multiple data nodes, the assignment based on resource requirements of each operation and available resources at each node.

### Claim 17 (depends on 10)

The coordinator of claim 10, wherein the one or more processors execute the instructions to send an operation initiating message to each data node instructing each data node to perform an operation on the transaction.

### Claim 18 (depends on 10)

The coordinator of claim 10, wherein the one or more processors execute the instructions to:
receive a transaction commit message from the application server;
determine that the transaction is a multi-node transaction, and based thereon, perform a two-phase commit;
send a respective commit prepared messages to each data node; and
receive a corresponding commit result message from each data node.

### Claim 19 (depends on 10)

The coordinator of claim 10, wherein the one or more processors execute the instructions to generate the DXID for the transaction based on determining that the transaction is a write transaction.

### Claim 20 (depends on 10)

The coordinator of claim 10, wherein the one or more processors execute the instructions to:
send a transaction response message to the application server; and
receive an operation command message from the application server.
