# US 12,007,954 B1 · Selective forwarding for multi-statement database transactions

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

- Number: US 12,007,954 B1
- Document ID: US12007954B1
- Status: Granted
- Kind: B1
- Application number: 16/870,824
- Filed: 2020-05-08
- Granted: 2024-06-11
- Earliest claimed: 2020-05-08
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Dhruva Ranjan Chakrabarti; Atrayee Mullick; Damien Katz; Saraswathy Narayan; Jianguo Wang; Huawei Wang; Alexandre Olegovich Verbitski; Tengiz Kharatishvili; Yingjie He; Gopi Krishna Attaluri
- Web page: https://patentgrep.com/patent/US12007954B1

## CPC

- G06F 16/1865: {Transactional file systems}
- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 16/184: {implemented as replicated file system}
- 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

Transaction statements may be forwarded for a database transaction. A transaction begun at a read-only node may include a write statement. The read-only node may forward the write statement to the read-only node to perform as a transaction. The read-only node may update a read view for the transaction to include the write statement before performing a read statement submitted after the write statement at the read-only node.

## Claims

### Claim 1

A system, comprising:
a plurality of nodes, respectively comprising at least one processor and a memory, that implement a database system, wherein one of the plurality of nodes implements a read-only node for the database system and another one of the plurality of nodes implements a read-write node for the database system distinct from the read-only node, and wherein the read-only node is configured to perform only read statements and the read-write node is configured to perform write statements;
wherein the read-only node is configured to:
receive a read statement as part of a transaction started at the read-only node;
determine a read view of database data to perform the read statement;
receive a write statement as part of the transaction;
send the write statement to the read-write node for the database;
wherein the read-write node is configured to
perform the write statement as a primary node transaction to the database;
return an acknowledgment of performing the write statement to the read-only node;
wherein the read-only node is further configured to:
receive another read statement as part of the transaction after the write statement;
wait to perform the other read statement until after:
the acknowledgement of the performance of the write statement is received from the read-write node; and
the read view of the database is updated to include the write statement acknowledged by the read-write node.

### Claim 2 (depends on 1)

The system of claim 1, wherein the read-only node is further configured to:
receive a request to commit the transaction;
send a request to commit the primary node transaction to the read-write node;
responsive to receipt of an acknowledgement that the primary node transaction committed, return a response indicating that the transaction committed.

### Claim 3 (depends on 1)

The system of claim 1,
wherein the read-write node is further configured to:
detect a rollback event for the primary node transaction;
rollback the primary node transaction; and
send a notification to the read-only node that the primary node transaction aborted;
wherein the read-only node is further configured:
abort the transaction at the read-only node; and
send a notification of the aborted transaction to a client that submitted the transaction.

### Claim 4 (depends on 1)

The system of claim 1, wherein the database system is implemented as part of a database service offered by a provider network and wherein forwarding of transactions to the read-write node is enabled via a request to the database service.

### Claim 5

A method, comprising:
receiving, at a read-only node for a database, a write statement as part of a transaction started at the read-only node, wherein the read-only node is configured to perform only read statements;
sending, by the read-only node, the write statement to a read-write node for the database, wherein the read-write node is a node distinct from the read-only node and configured to perform write statements;
performing, by the read-write node, the write statement as a transaction to the database;
receiving, by the read-only node, a read statement received as part of the transaction after the write statement;
waiting, by the read-only node, to perform the read statement until after:
receiving, at the read-only node, an acknowledgement of the performance of the write statement from the read-write node; and
updating, by the read-only node, a read view of the database determined at the read-only node to include the write statement.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
detecting, by the read-write node, a rollback event for the read-write node transaction;
performing, by the read-write node, a rollback of the read-write node transaction;
sending, by the read-write node, a notification to the read-only node that the read-write node transaction aborted;
responsive to receiving the notification at the read-only node:
aborting the transaction at the read-only node; and
sending, by the read-only node, a notification of the aborted transaction to a client that submitted the transaction.

### Claim 7 (depends on 6)

The method of claim 6, wherein a session to establish communications for the transaction is established between the read-only node and the read-write node, and wherein detecting the rollback event for the read-write node transaction comprises an idle time for the session exceeding a session timeout for the session.

### Claim 8 (depends on 6)

The method of claim 6, wherein a session to establish communications for the transaction is established between the read-only node and the read-write node, and wherein detecting the rollback event for the read-write node transaction comprises receiving a request to end the session at the read-write node.

### Claim 9 (depends on 6)

The method of claim 6, wherein a session to establish communications for the transaction is established between the read-only node and the read-write node, and wherein detecting the rollback event for the read-write node transaction comprises receiving a request to end the session at the read-write node.

### Claim 10 (depends on 5)

The method of claim 5, wherein updating the read view of the database at the read-only node to include the write statement comprises applying an update received from the read-write node that includes a logical sequence number (LSN) equivalent to a statement LSN received with an acknowledgement of the performance of the write statement from the read-write node.

### Claim 11 (depends on 5)

The method of claim 5, wherein a session to establish communications for the transaction is established between the read-only node and the read-write node and wherein the method further comprises:
detecting, by the read-write node, a rollback event for the read-write node transaction;
performing, by the read-write node, a rollback of the read-write node transaction;
sending, by the read-write node, a notification to the read-only node that the read-write node transaction aborted;
responsive to receiving the notification at the read-only node:
establishing a new session between the read-only node and the read-write node.

### Claim 12 (depends on 5)

The method of claim 5, wherein the read view is created in response to another write statement sent as part of the transaction before the write statement is received.

### Claim 13 (depends on 5)

The method of claim 5, further comprising:
receiving, at the read-only node, a request to commit the transaction;
sending, by the read-only node, a request to commit the read-write node transaction to the read-write node;
responsive to receiving an acknowledgement that the read-write node transaction committed, return a response indicating that the transaction committed.

### Claim 14

One or more non-transitory, computer-readable storage media, storing program instructions that when executed on or across one or more computing devices cause the one or more computing devices to implement:
receiving, at a read-only node for a database, a write statement as part of a transaction started at the read-only node, wherein the read-only node is configured to perform only read statements;
sending, by the read-only node, the write statement to a read-write node for the database, wherein the read-write node is a node distinct from the read-only node and configured to perform write statements;
receiving, by the read-only node, a read statement received as part of the transaction after the write statement;
waiting, by the read-only node, to perform the read statement until after:
receiving, at the read-only node, an acknowledgment that the write statement was performed as part of a read-write node transaction to the database; and
updating, by the read-only node, a read view of the database determined at the read-only node to include the write statement.

### Claim 15 (depends on 14)

The one or more non-transitory, computer-readable storage media of claim 14, storing program instructions that when executed by the one or more computing devices cause the one or more computing devices to further implement:
receiving, at the read-only node, a request to commit the transaction;
sending, by the read-only node, a request to commit the read-write node transaction to the read-write node;
responsive to receiving an acknowledgement that the read-write node transaction committed, return a response indicating that the transaction committed.

### Claim 16 (depends on 14)

The one or more non-transitory, computer-readable storage media of claim 14, storing program instructions that when executed by the one or more computing devices cause the one or more computing devices to further implement:
receiving, at the read-only node, a notification that the read-write node transaction aborted from the read-write node;
responsive to receiving the notification at the read-only node:
aborting the transaction at the read-only node; and
sending, by the read-only node, a notification of the aborted transaction to a client that submitted the transaction.

### Claim 17 (depends on 16)

The one or more non-transitory, computer-readable storage media of claim 16, wherein a session to establish communications for the transaction is established between the read-only node and the read-write node, and wherein the read-write node transaction aborted after exceeding a session timeout for the session.

### Claim 18 (depends on 16)

The one or more non-transitory, computer-readable storage media of claim 16, wherein a session to establish communications for the transaction is established between the read-only node and the read-write node, and wherein the read-write node transaction aborted after receiving a request to end the session at the read-write node.

### Claim 19 (depends on 14)

The one or more non-transitory, computer-readable storage media of claim 14, wherein the read view is created in response to a read statement sent as part of the transaction before the write statement is received.

### Claim 20 (depends on 14)

The one or more non-transitory, computer-readable storage media of claim 14, wherein the database is implemented as part of a database service offered by a provider network and wherein forwarding of transactions to a read-write node is enabled via a request to the database service.
