IP Library Granted Patent US 11,741,073
Granted Patent B2
US 11,741,073 · App. 17/336,141 · Granted Aug 29, 2023

Granularly timestamped concurrency control for key-value store

Inventors: Rui Wang (Redmond, WA); Zhu Pang (Bellevue, WA); Qingda Lu (Bellevue, WA); Shuo Chen (Bellevue, WA); Jiesheng Wu (Redmond, WA)
Assignee: Alibaba Singapore Holding Private Limited
G06F16/2322G06F16/2379G06F16/248G06F16/278
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,741,073
App. No.
17/336,141
Granted
Aug 29, 2023
Kind
B2
Abstract

Systems and methods discussed herein, based on a key-value data store including multiple-tiered sorted data structures in memory and storage, implement granularly timestamped concurrency control. The multiple-tiering of the key-value data store enables resolving the snapshot queries by returning data record(s) according to granularly timestamped snapshot lookup instead of singularly indexed snapshot lookup. Queries return a merged collection of records including updates from data structures in memory and in storage, such that a persistent storage transaction may refer to non-committed updates up to a timeframe defined by the snapshot read timestamp. This way, inconsistency is avoided that would result from merely reading data records committed in storage, without regard as to pending, non-committed updates thereto. The global timestamp further modifies the generation of the local transaction commit timestamp and the local snapshot read timestamp, so as to establish a granularly timestamped concurrency control scheme (over three levels of granularity).

Claims (32)

1. A method comprising:

recording, by a key-value (“KV”) store engine running on a storage system, a largest committed system timestamp and a smallest non-committed transaction commit timestamp;

setting, by the KV store engine, a snapshot read timestamp of a persistent storage transaction based on the largest committed system timestamp and the smallest non-committed transaction commit timestamp;

returning, by the KV store engine, a merged collection of records based on an upper bound and a lower bound derived from the snapshot read timestamp;

mapping, by the KV store engine, a global timestamp of the sub-transaction to a largest local transaction commit timestamp of a sub-transaction of the plurality of sub-transactions at a partition of the storage system;

setting, by the KV store engine, in the event that the smallest mapped global timestamp is larger than a largest committed global timestamp at the partition or is equal to the largest committed global timestamp, a snapshot read timestamp of the sub-transaction at the partition to a largest local transaction commit timestamp; and

setting, by the KV store engine, in the event that the smallest mapped global timestamp is larger than the largest committed global timestamp, the snapshot read timestamp of the sub-transaction to the largest local transaction commit timestamp less 1.

2. The method of claim 1 , wherein the snapshot read timestamp comprises the largest committed system timestamp, and comprises the smallest non-committed transaction commit timestamp less 1.

3. The method of claim 1 , further comprising dividing, by the KV store engine, a persistent storage transaction into a plurality of sub-transactions.

4. The method of claim 1 , further comprising recording, by the KV store, a largest global timestamp among sub-transactions committed at the partition, and recording, by the KV store, a smallest snapshot read global timestamp across all partitions.

5. A storage system comprising:

one or more processors;

hosted storage; and

memory communicatively coupled to the one or more processors, the memory storing computer-executable modules executable by the one or more processors that, when executed by the one or more processors, perform associated operations, the computer-executable modules comprising:

a timestamp recording module configured to record, by a key-value (“KV”) store engine running on a storage system, a largest committed system timestamp and a smallest non-committed transaction commit timestamp;

a timestamp setting module, configured to set a snapshot read timestamp of a persistent storage transaction based on the largest committed system timestamp and the smallest non-committed transaction commit timestamp;

a query returning module, configured to return a merged collection of records based on an upper bound and a lower bound derived from the snapshot read timestamp;

a timestamp mapping module, configured to map a global timestamp of the sub-transaction to a largest local transaction commit timestamp of a sub-transaction of the plurality of sub-transactions at a partition of the storage system;

a read timestamp determining module, configured to set, in the event that the smallest mapped global timestamp is larger than a largest committed global timestamp at the partition or is equal to the largest committed global timestamp, a snapshot read timestamp of the sub-transaction at the partition to a largest local transaction commit timestamp; and to set, in the event that the smallest mapped global timestamp is larger than the largest committed global timestamp, the snapshot read timestamp of the sub-transaction to the largest local transaction commit timestamp less 1.

6. The system of claim 5 , wherein the snapshot read timestamp comprises the largest committed system timestamp, and comprises the smallest non-committed transaction commit timestamp less 1.

7. The system of claim 5 , further comprising a transaction dividing module configured to divide a persistent storage transaction into a plurality of sub-transactions.

8. The system of claim 5 , wherein the timestamp recording module is further configured to record a largest global timestamp among sub-transactions committed at the partition, and record a smallest snapshot read global timestamp across all partitions.

9. A computer-readable storage medium storing computer-readable instructions executable by one or more processors, that when executed by the one or more processors, cause the one or more processors to perform operations comprising:

recording, by a key-value (“KV”) store engine running on a storage system, a largest committed system timestamp and a smallest non-committed transaction commit timestamp;

setting, by the KV store engine, a snapshot read timestamp of a persistent storage transaction based on the largest committed system timestamp and the smallest non-committed transaction commit timestamp;

returning, by the KV store engine, a merged collection of records based on an upper bound and a lower bound derived from the snapshot read timestamp;

mapping, by the KV store engine, a global timestamp of the sub-transaction to a largest local transaction commit timestamp of a sub-transaction of the plurality of sub-transactions at a partition of the storage system;

setting, by the KV store engine, in the event that the smallest mapped global timestamp is larger than a largest committed global timestamp at the partition or is equal to the largest committed global timestamp, a snapshot read timestamp of the sub-transaction at the partition to a largest local transaction commit timestamp; and

setting, by the KV store engine, in the event that the smallest mapped global timestamp is larger than the largest committed global timestamp, the snapshot read timestamp of the sub-transaction to the largest local transaction commit timestamp less 1.

10. The computer-readable storage medium of claim 9 , wherein the snapshot read timestamp comprises the largest committed system timestamp, and comprises the smallest non-committed transaction commit timestamp less 1.

11. The computer-readable storage medium of claim 9 , wherein the operations further comprise dividing, by the KV store engine, a persistent storage transaction into a plurality of sub-transactions.

12. The computer-readable storage medium of claim 4 , wherein the operations further comprise recording, by the KV store, a largest global timestamp among sub-transactions committed at the partition, and recording, by the KV store, a smallest snapshot read global timestamp across all partitions.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA INNOVATION PRIVATE LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075494/0445 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 6, 2024
From: ALIBABA SINGAPORE HOLDING PRIVATE LIMITED
To: ALIBABA INNOVATION PRIVATE LIMITED
Reel/Frame 066397/0167 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 31, 2023
From: WANG, RUI; LU, QINGDA; PANG, ZHU; WU, JIESHENG; CHEN, SHUO
To: ALIBABA SINGAPORE HOLDING PRIVATE LIMITED
Reel/Frame 063195/0606 →