IP Library Granted Patent US 11,138,180
Granted Patent B2
US 11,138,180 · App. 16/399,870 · Granted Oct 5, 2021

Transaction protocol for reading database values

Inventors: Allen Chang (Mountain View, CA); John Antonio Carrino (Menlo Park, CA)
Assignee: Palantir Technologies Inc.
G06F16/2322G06F16/1774G06F16/2336G06F16/2365G06F16/2379
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,138,180
App. No.
16/399,870
Granted
Oct 5, 2021
Kind
B2
Abstract

Techniques are provided for more efficient multi-row atomic, consistent, isolated and durable (ACID)-compliant transactions with snapshot isolation semantics (or just “multi-row transactions” for short). In some embodiments, the techniques are implemented in a computing system that includes a client application, a lightweight in-memory lease-based lock service, a multi-row transaction orchestrator, and an underlying database system. The transaction orchestrator implements a read protocol and a write protocol that provides support to the client application for carrying out multi-row transactions against the underlying database system irrespective of whether the database system itself supports multi-row transactions. The transaction orchestrator explicitly maintains transaction-level locks obtained from the lease-based lock service as part of the transaction protocol. Further, the transaction orchestrator is tolerant to lock service failure and unavailability without compromising ACID-compliance and snapshot isolation guarantees to the client application.

Claims (50)

1. A method comprising the steps of:

receiving a request specifying a database table cell in context of a first transaction, wherein the database table cell stores a plurality of database values, and wherein each database value of the plurality of database values is associated with a respective write timestamp value;

in response to receiving the request:

reading a first database value from the plurality of database values;

validating the first database value based on the respective write timestamp value associated with the first database value and a transaction table, wherein the transaction table associates write timestamp values with transaction commit timestamp values;

wherein validating the first database value based on the respective write timestamp value associated with the first database value and the transaction table is based on:

acquiring a lock on a row of the transaction table from a lock service, the row comprising the respective write timestamp value associated with the first database value,

obtaining from the row a transaction commit timestamp value associated with the respective write timestamp value associated with the first database value while the lock is acquired, and

validating the first database value based on the transaction commit timestamp value read from the row; and

in response to validating the first database value, providing the first database value in context of the first transaction;

wherein the method is performed by one or more computing devices.

2. The method of claim 1 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell committed before the first transaction started.

3. The method of claim 1 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell has committed.

4. The method of claim 1 wherein validating the first database value comprises determining whether the respective write timestamp value associated with the first database value is associated with a valid transaction commit timestamp value.

5. The method of claim 1 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell started before the first transaction started.

6. The method of claim 1 further comprising obtaining a timestamp value associated with a start of the first transaction, and wherein validating the first database value is further based on the timestamp value associated with the start of the first transaction.

7. The method of claim 1 , wherein the first database value is associated with the respective write timestamp value in the database table cell, and wherein obtaining the respective write timestamp value associated with the first database value includes reading the respective write timestamp value from the database table cell.

8. A system comprising:

one or more processors;

one or more non-transitory computer-readable storage media coupled to the one or more processors and storing one or more sequences of instructions which, when executed by the one or more processors, cause performing the steps of:

receiving a request specifying a database table cell in context of a first transaction, wherein the database table cell stores a plurality of database values, and wherein each database value of the plurality of database values is associated with a respective write timestamp value;

in response to receiving the request:

reading a first database value from the plurality of database values;

validating the first database value based on the respective write timestamp value associated with the first database value and a transaction table, wherein the transaction table associates write timestamps with transaction commit timestamp values;

wherein validating the first database value based on the respective write timestamp value associated with the first database value and the transaction table is based on:

acquiring a lock on a row of the transaction table from a lock service, the row comprising the respective write timestamp value associated with the first database value,

reading from the row a transaction commit timestamp value associated with the respective write timestamp value associated with the first database value while the lock is acquired, and

validating the first database value based on the transaction commit timestamp value read from the row; and

in response to validating the first database value, providing the first database value in context of the first transaction.

9. The system of claim 8 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell committed before the first transaction started.

10. The system of claim 8 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell has committed.

11. The system of claim 8 wherein validating the first database value comprises determining whether the respective write timestamp value associated with the first database value is associated with a valid commit timestamp value.

12. The system of claim 8 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell started before the first transaction started.

13. The system of claim 8 wherein the one or more sequences of instructions, when executed by the one or more processors, further cause performing the step of: obtaining a timestamp value associated with a start of the first transaction, and wherein validating the first database value is further based on the timestamp value associated with the start of the first transaction.

14. The system of claim 8 , wherein the first database value is associated with the respective write timestamp value in the database table cell, and wherein obtaining the respective write timestamp value associated with the first database value includes reading the respective write timestamp value from the database table cell.

15. A non-transitory storage media storing one or more sequences of instructions which, when executed by one or more processors, cause:

receiving a request specifying a database table cell in context of a first transaction, wherein the database table cell stores a plurality of database values, and wherein each database value of the plurality of database values is associated with a respective write timestamp value;

in response to receiving the request:

reading a first database value from the plurality of database values;

validating the first database value based on the respective write timestamp value associated with the first database value and a transaction table, wherein the transaction table associates write timestamps with transaction commit timestamp values;

wherein validating the first database value based on the respective write timestamp value associated with the first database value and the transaction table is based on:

acquiring a lock on a row of the transaction table from an in-memory lease-based lock service, the row comprising the respective write timestamp value associated with the first database value,

reading from the row a transaction commit timestamp value associated with the respective write timestamp value associated with the first database value while the lock is acquired, and

validating the first database value based on the transaction commit timestamp value read from the row; and

in response to validating the first database value, providing the first database value in context of the first transaction.

16. The non-transitory storage media of claim 15 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell committed before the first transaction started.

17. The non-transitory storage media of claim 15 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell has committed.

18. The non-transitory storage media of claim 15 wherein validating the first database value comprises determining whether the respective write timestamp value associated with the first database value is associated with a valid commit timestamp value.

19. The non-transitory storage media of claim 15 wherein validating the first database value comprises determining whether a second transaction that wrote the first database value to the database table cell started before the first transaction started.

20. The non-transitory storage media of claim 15 wherein the one or more sequences of instructions, when executed by the one or more processors, further cause performing the step of: obtaining a timestamp value associated with a start of the first transaction, and wherein validating the first database value is further based on the timestamp value associated with the start of the first transaction.

Assignments (7)
SECURITY INTEREST Recorded Jul 3, 2022
From: PALANTIR TECHNOLOGIES INC.
To: WELLS FARGO BANK, N.A.
Reel/Frame 060572/0506 →
ASSIGNMENT OF INTELLECTUAL PROPERTY SECURITY AGREEMENTS Recorded Jul 3, 2022
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: WELLS FARGO BANK, N.A.
Reel/Frame 060572/0640 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ERRONEOUSLY LISTED PATENT BY REMOVING APPLICATION NO. 16/832267 FROM THE RELEASE OF SECURITY INTEREST PREVIOUSLY RECORDED ON REEL 052856 FRAME 0382. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Aug 26, 2021
From: ROYAL BANK OF CANADA
To: PALANTIR TECHNOLOGIES INC.
Reel/Frame 057335/0753 →
SECURITY INTEREST Recorded Jun 4, 2020
From: PALANTIR TECHNOLOGIES INC.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 052856/0817 →
RELEASE OF SECURITY INTEREST Recorded Jun 4, 2020
From: ROYAL BANK OF CANADA
To: PALANTIR TECHNOLOGIES INC.
Reel/Frame 052856/0382 →
SECURITY INTEREST Recorded Jan 27, 2020
From: PALANTIR TECHNOLOGIES INC.
To: ROYAL BANK OF CANADA, AS ADMINISTRATIVE AGENT
Reel/Frame 051709/0471 →
SECURITY INTEREST Recorded Jan 27, 2020
From: PALANTIR TECHNOLOGIES INC.
To: MORGAN STANLEY SENIOR FUNDING, INC., AS ADMINISTRATIVE AGENT
Reel/Frame 051713/0149 →
Continuity (5)
Continuation 15391778 · Dec 27, 2016
Continuation 14580218 · Dec 23, 2014
Continuation 13958817 · Aug 5, 2013
Continuation 13224500 · Sep 2, 2011
Related Publication 20190258622A1 · Aug 22, 2019
Cited By (1)
US 12,242,463