# US 2019/0171478 A1 · Efficient and scalable transaction processing using a consensus-based transaction model

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

- Number: US 2019/0171478 A1
- Document ID: US20190171478A1
- Status: Published application
- Kind: A1
- Application number: 15/830,385
- Filed: 2017-12-04
- Published: 2019-06-06
- Earliest claimed: 2017-12-04
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Thomas J. Jenkinson; Paul F. Robinson
- Web page: https://patentgrep.com/patent/US20190171478A1

## CPC

- G06F 9/466: {Transaction processing}
- G06F 9/505: {considering the load}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/1474: in transactions (updating of structured data in databases G06F16/23)
- G06F 16/2308: {Concurrency control (transaction processing G06F9/466)}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/245: Query processing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An efficient and scalable transaction processing using a consensus-based transaction model is disclosed. A transaction processor receives a transaction that includes a plurality of update subtransactions to be performed against a corresponding plurality of resources. A transaction identifier (ID) that corresponds to the transaction is determined. For each resource of the plurality of resources, the transaction ID is sent to a resource manager associated with the resource to determine a status of the corresponding update subtransaction as one of 1) a not seen status, 2) a prepared status, or 3) a committed status. Based on the status of the corresponding update subtransaction, any action against the resource via the resource manager that is necessary to bring the status of the corresponding update subtransaction to the committed status is performed. The transaction is marked as being completed.

## Claims

### Claim 1

A method comprising:
receiving, by a transaction processor, a transaction comprising a plurality of update subtransactions to be performed against a corresponding plurality of resources;
determining a transaction identifier (ID) that corresponds to the transaction;
for each resource of the plurality of resources:
sending the transaction ID to a resource manager associated with the resource to determine a status of corresponding update subtransaction as one of 1) a not seen status, 2) a prepared status, or 3) a committed status; and
based on the status of the corresponding update subtransaction, performing any action against the resource via the resource manager that is necessary to bring the status of the corresponding update subtransaction to the committed status; and
marking the transaction as being completed.

### Claim 2 (depends on 1)

The method of claim 1 wherein sending the transaction ID to the resource manager to determine the status of the corresponding update subtransaction comprises:
querying a committed data structure associated with the resource with the transaction ID;
determining that the transaction ID is in the committed data structure;
determining that the status of the corresponding update subtransaction is the committed status based on determining that the transaction ID is in the committed data structure; and
performing no additional actions against the resource with respect to the transaction.

### Claim 3 (depends on 1)

The method of claim 1 wherein sending the transaction ID to the resource manager to determine the status of the corresponding update subtransaction comprises:
querying a committed data structure associated with the resource with the transaction ID;
determining that the transaction ID is not in the committed data structure;
querying a prepared data structure associated with the resource with the transaction ID;
determining that the transaction ID is in the prepared data structure;
determining that the status of the corresponding transaction is the prepared status based on determining that the transaction ID is in the prepared data structure; and
performing a commit operation against the resource to bring the status of the corresponding update subtransaction to the committed status.

### Claim 4 (depends on 1)

The method of claim 1 wherein sending the transaction ID to the resource manager to determine the status of the corresponding update subtransaction comprises:
querying a committed data structure associated with the resource with the transaction ID;
determining that the transaction ID is not in the committed data structure;
querying a prepared data structure associated with the resource with the transaction ID;
determining that the transaction ID is not in the prepared data structure;
determining that the status of the corresponding transaction is the not seen status based on determining that the transaction ID is not in the prepared data structure;
performing the corresponding update subtransaction against the resource;
performing a prepared operation against the resource; and
performing a commit operation against the resource.

### Claim 5 (depends on 1)

The method of claim 1 wherein receiving the transaction comprising the plurality of update subtransactions to be performed against the corresponding plurality of resources comprises receiving the transaction from a transaction manager.

### Claim 6 (depends on 1)

The method of claim 1 wherein receiving the transaction comprising the plurality of update subtransactions to be performed against the corresponding plurality of resources comprises:
accessing a transaction queue; and
extracting the transaction from the transaction queue.

### Claim 7 (depends on 1)

The method of claim 1 further comprising:
receiving a response from a first resource of the plurality of resources that identifies the status of the corresponding update subtransaction as the committed status; and
based on the status being the committed status, performing no actions against the first resource.

### Claim 8 (depends on 7)

The method of claim 7 wherein receiving the response that identifies the status of the corresponding update subtransaction further comprises:
receiving a response from a second resource of the plurality of resources that identifies a status of the corresponding update subtransaction as the prepared status;
based on the status being the prepared status, performing the corresponding update subtransaction against the second resource; and
directing the second resource to commit the corresponding update subtransaction to at least one update.

### Claim 9 (depends on 1)

The method of claim 1 wherein the corresponding plurality of resources comprises corresponding databases.

### Claim 10

A computing device, comprising:
a memory; and
a processor device coupled to the memory to:
receive a transaction comprising a plurality of update subtransactions to be performed against a corresponding plurality of resources;
determine a transaction identifier (ID) that corresponds to the transaction;
for each resource of the plurality of resources:
send the transaction ID to a resource manager associated with the resource to determine a status of the corresponding subtransaction as one of 1) a not seen status, 2) a prepared status, or 3) a committed status; and
based on the status of the corresponding update subtransaction, perform any action against the resource via the resource manager that is necessary to bring the status of the corresponding update subtransaction to the committed status; and mark the transaction as being completed.

### Claim 11 (depends on 10)

The computing device of claim 10 wherein to send the transaction ID to the resource manager to determine the status of the corresponding update subtransaction, the processor device is further to:
query a committed data structure associated with the resource with the transaction ID;
determine that the transaction ID is in the committed data structure;
determine that the status of the corresponding update subtransaction is the committed status based on determining that the transaction ID is in the committed data structure; and
perform no additional actions against the resource with respect to the transaction.

### Claim 12 (depends on 10)

The computing device of claim 10 wherein the processor device is further to:
receive a response from a first resource of the plurality of resources that identifies a status of the corresponding update subtransaction as the committed status; and
based on the status being the committed status, perform no actions against the first resource.

### Claim 13 (depends on 12)

The computing device of claim 12 wherein to receive the response that identifies the status of the corresponding update subtransaction, the processor device is further to:
receive a response from a second resource of the plurality of resources that identifies a status of the corresponding update subtransaction as the prepared status;
based on the status being the prepared status, perform the corresponding update subtransaction against the second resource; and
direct the second resource to commit the corresponding update subtransaction to at least one update.

### Claim 14 (depends on 10)

The computing device of claim 10 wherein to send the transaction ID to the resource manager to determine the status of the corresponding update subtransaction, the processor device is further to:
query a committed data structure associated with the resource with the transaction ID;
determine that the transaction ID is not in the committed data structure;
query a prepared data structure associated with the resource with the transaction ID;
determine that the transaction ID is not in the prepared data structure;
determine that the status of the corresponding update subtransaction is the not seen status based on determining that the transaction ID is not in the prepared data structure;
perform the corresponding update subtransaction against the resource;
perform a prepared operation against the resource; and
perform a commit operation against the resource.

### Claim 15

A computer program product stored on a non-transitory computer-readable storage medium and including instructions configured to cause a processor device to:
receive a transaction comprising a plurality of update subtransactions to be performed against a corresponding plurality of resources;
determine a transaction identifier (ID) that corresponds to the transaction;
for each resource of the plurality of resources:
send the transaction ID to a resource manager associated with the resource to determine a status of the corresponding update subtransaction as one of 1) a not seen status, 2) a prepared status, or 3) a committed status; and
based on the status of the corresponding update subtransaction, perform any action against the resource via the resource manager that is necessary to bring the status of the corresponding update subtransaction to the committed status; and
mark the transaction as being completed.

### Claim 16 (depends on 15)

The computer program product of claim 15 wherein to send the transaction ID to the resource manager to determine the status of the corresponding update subtransaction, the instructions further cause the processor device to:
query a committed data structure associated with the resource with the transaction ID;
determine that the transaction ID is in the committed data structure;
determine that the status of the corresponding update subtransaction is the committed status based on determining that the transaction ID is in the committed data structure; and
perform no additional actions against the resource with respect to the transaction.

### Claim 17 (depends on 15)

The computer program product of claim 15 wherein the instructions further cause the processor device to:
receive a response from a first resource of the plurality of resources that identifies a status of the corresponding update subtransaction as a committed status; and
based on the status being the committed status, perform no actions against the first resource.

### Claim 18 (depends on 17)

The computer program product of claim 17 wherein to receive the response that identifies the status of the corresponding update subtransaction, the instructions further cause the processor device to:
receive a response from a second resource of the plurality of resources that identifies a status of the corresponding update subtransaction as the prepared status;
based on the status being the prepared status, perform the corresponding update subtransaction against the second resource; and
direct the second resource to commit the corresponding update subtransaction to at least one update.

### Claim 19 (depends on 15)

The computer program product of claim 15 wherein to send the transaction ID to the resource manager to determine the status of the corresponding update subtransaction, the instructions further cause the processor device to:
query a committed data structure associated with the resource with the transaction ID;
determine that the transaction ID is not in the committed data structure;
query a prepared data structure associated with the resource with the transaction ID;
determine that the transaction ID is not in the prepared data structure;
determine that the status of the corresponding update subtransaction is the not seen status based on determining that the transaction ID is not in the prepared data structure;
perform the corresponding update subtransaction against the resource;
perform a prepared operation against the resource; and
perform a commit operation against the resource.
