IP Library Granted Patent US 11,468,032
Granted Patent B2
US 11,468,032 · App. 17/163,034 · Granted Oct 11, 2022

Concurrent transaction processing in a database system

Inventors: Alexander Miller (San Mateo, CA); William Waddington (San Mateo, CA)
Assignee: Snowflake Inc.
G06F16/2329G06F16/2282G06F16/248G06F16/24568
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,468,032
App. No.
17/163,034
Granted
Oct 11, 2022
Kind
B2
Abstract

The subject technology receives a first transaction. The subject technology assigns a first read version to the first transaction, the first read version indicating a first version of the linearizable storage. The subject technology performs a read operation from the first transaction on a table in a database. The subject technology determines a first commit version identifier corresponding to first data resulting from the read operation. The subject technology, in response to determining that a particular write operation is absent from the first transaction, proceeding to execute a different transaction and foregoing to perform a commit process in connection with the first transaction.

Claims (69)

1. A system comprising:

at least one hardware processor; and

a memory storing instructions that cause the at least one hardware processor to perform operations comprising:

receiving a first transaction, the first transaction to be executed on linearizable storage;

assigning, prior to performing a read operation, a first read version to the first transaction, the first read version indicating a first version of the linearizable storage, the first read version corresponding to a particular timestamp of a current time;

performing the read operation from the first transaction on a table in a database;

determining a first commit version identifier corresponding to first data resulting from the read operation; and

in response to determining that a particular write operation is absent from the first transaction, proceeding to execute a different transaction and foregoing to perform a commit process in connection with the first transaction to protect an integrity and consistency of the first data.

2. The system of claim 1 , wherein the operations further comprise:

receiving a second transaction, the second transaction to be executed on the linearizable storage;

assigning the second transaction a second read version, the second read version indicating a second version of the linearizable storage;

performing a second read operation from the second transaction on the table in the database; and

performing a write operation from the second transaction on the table in the database.

3. The system of claim 2 , wherein performing the write operation from the second transaction comprises:

determining a particular commit version identifier corresponding to second data results from the second read operation; and

completing the write operation in response to the particular commit version identifier being equivalent to the first commit version identifier.

4. The system of claim 2 , wherein the operations further comprise:

assigning a second commit version identifier to second data stored to the table from the write operation, the second commit version identifier corresponding to a second version of data in the table, the second commit version identifier different than the first commit version identifier; and

initiating a commit process for the second transaction.

5. The system of claim 4 , wherein assigning the second commit version identifier comprises incrementing a value associated with the first commit version identifier to determine the second commit version identifier.

6. The system of claim 4 , wherein the operations further comprise:

proceeding to perform a particular write operation from the first transaction;

determining that the first commit version identifier fails to match the second commit version identifier; and

aborting the particular write operation from the first transaction.

7. The system of claim 6 , wherein the operations further comprise:

performing a particular read operation from the first transaction on the table in the database; and

determining a particular commit version identifier corresponding to particular data resulting from the particular read operation.

8. The system of claim 7 , wherein the operations further comprise:

retrying to perform the particular write operation from the first transaction; and

performing the particular write operation in response to the particular commit version identifier matching the second commit version identifier.

9. The system of claim 8 , wherein the operations further comprise:

initiating a particular commit process for the first transaction.

10. The system of claim 1 , wherein the database comprises a distributed database.

11. A method comprising:

receiving a first transaction, the first transaction to be executed on linearizable storage;

assigning, prior to performing a read operation, a first read version to the first transaction, the first read version indicating a first version of the linearizable storage, the first read version corresponding to a particular timestamp of a current time;

performing the read operation from the first transaction on a table in a database;

determining a first commit version identifier corresponding to first data resulting from the read operation; and

in response to determining that a particular write operation is absent from the first transaction, proceeding to execute a different transaction and foregoing to perform a commit process in connection with the first transaction to protect an integrity and consistency of the first data.

12. The method of claim 11 , further comprising:

receiving a second transaction;

assigning the second transaction a second read version, the second read version indicating a second version of the linearizable storage;

performing a second read operation from the second transaction on the table in the database; and

performing a write operation from the second transaction on the table in the database.

13. The method of claim 12 , wherein performing the write operation from the second transaction comprises:

determining a particular commit version identifier corresponding to second data results from the second read operation; and

completing the write operation in response to the particular commit version identifier being equivalent to the first commit version identifier.

14. The method of claim 12 , further comprising:

assigning a second commit version identifier to second data stored to the table from the write operation, the second commit version identifier corresponding to a second version of data in the table, the second commit version identifier different than the first commit version identifier; and

initiating a commit process for the second transaction.

15. The method of claim 14 , wherein assigning the second commit version identifier comprises incrementing a value associated with the first commit version identifier to determine the second commit version identifier.

16. The method of claim 14 , further comprising:

proceeding to perform a particular write operation from the first transaction;

determining that the first commit version identifier fails to match the second commit version identifier; and

aborting the particular write operation from the first transaction.

17. The method of claim 16 , further comprising:

performing a particular read operation from the first transaction on the table in the database; and

determining a particular commit version identifier corresponding to particular data resulting from the particular read operation.

18. The method of claim 17 , further comprising:

retrying to perform the particular write operation from the first transaction; and

performing the particular write operation in response to the particular commit version identifier matching the second commit version identifier.

19. The method of claim 18 , further comprising:

initiating a particular commit process for the first transaction.

20. A computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising:

receiving a first transaction, the first transaction to be executed on linearizable storage;

assigning, prior to performing a read operation, a first read version to the first transaction, the first read version indicating a first version of the linearizable storage, the first read version corresponding to a particular timestamp of a current time;

performing the read operation from the first transaction on a table in a database;

determining a first commit version identifier corresponding to first data resulting from the read operation; and

in response to determining that a particular write operation is absent from the first transaction, proceeding to execute a different transaction and foregoing to perform a commit process in connection with the first transaction to protect an integrity and consistency of the first data.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 29, 2021
From: MILLER, ALEXANDER; WADDINGTON, WILLIAM
To: SNOWFLAKE INC.
Reel/Frame 056705/0744 →
Continuity (2)
Provisional Application 63081611 · Sep 22, 2020
Related Publication 20220092051A1 · Mar 24, 2022