IP Library › Granted Patent US 11,561,953
Granted Patent B2
US 11,561,953 · App. 17/296,441 · Granted Jan 24, 2023

Cosharding and randomized cosharding

Inventors: Alexander Khesin (Hoboken, NJ); Alexander Lloyd (New York, NY); Sebastian Kanthak (Los Altos, CA)
Assignee: Google LLC
G06F16/2282G06F16/2477G06F16/27
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,561,953
App. No.
17/296,441
Granted
Jan 24, 2023
Kind
B2
Abstract

The technology relates to cosharding tables within a distributed storage system. A data table including one or more rows may be received. Each row in the data table may include an identifier key and pieces of data. Each piece of data in the data table may be indexed into individual rows of an index table, wherein each row in the index table includes data associated with the identifier key of the data table from which the piece of data in the respective row was indexed. The index table may be sharded into splits, wherein the sharding includes assigning each row of the index table into one of the splits based on the identifier key of the data table from which the piece of data in the respective row was indexed. The splits may be stored into two or more portions of the distributed storage system.

Claims (47)

1. A method for cosharding tables within a distributed storage system, the method comprising:

receiving, by one or more processors, a data table including one or more rows, wherein each row includes an identifier key and one or more pieces of data;

indexing, by the one or more processors, each piece of the one or more pieces of data in the data table into individual rows of an index table, wherein each row in the index table includes a piece of the one or more pieces of data and the identifier key of the row of the data table from which the piece of data was indexed;

sharding, by the one or more processors, the index table into splits, wherein the sharding includes assigning each row of the index table into one of the splits based on the identifier key of the data table from which the piece of data in the respective row was indexed;

sharding the one or more rows from the data table, such that each row of the one or more rows of the data table is together with the individual row of the index table to which the pieces of data of the respective row of the data table were indexed; and

storing, by the one or more processors, the splits into two or more portions of the distributed storage system.

2. The method of claim 1 , wherein the sharded one or more rows from the data table are stored in the same split as the individual row of the index table to which the pieces of data of the respective row of the data table were indexed.

3. The method of claim 1 , wherein the data in the data table is in one or more columns of the data table.

4. The method of claim 1 , wherein the identifier key includes a randomly generated number, and

the splits are sorted by the timestamp.

5. The method of claim 1 , wherein the identifier key includes a timestamp, and

the splits are sorted by the timestamp.

6. The method of claim 1 , wherein the identifier key includes a monotonically increasing or decreasing value, and

the splits are sorted by the monotonically increasing or decreasing value.

7. The method of claim 1 , wherein storing the splits into two or more portions of the distributed storage system include storing a first split into a first portion of the two or more portions of the distributed storage system and a second split into a second portion of the two or more portions of the distributed storage system.

8. The method of claim 7 , further comprising:

receiving a request to retrieve one or more keys associated with the indexed pieces of data;

in response to receiving the request, identifying in the first split, by a first server of the distributed data system, and in the second split, by a second server of the distributed data system, the one or more keys associated with the indexed pieces of data;

merging the identified keys from the first and second splits;

and outputting, by the distributed data system, the merged keys.

9. The method of claim 1 , wherein each row in the data table gets indexed into the index table transactionally in a relational online database stored in the distributed storage system.

10. A system for cosharding a table, the system comprising:

a distributed storage system; and

one or more processors, wherein the one or more processors are configured to:

receive a data table including one or more rows, wherein each row includes an identifier key and one or more pieces of data;

index each piece of the one or more pieces of data in the data table into individual rows of an index table, wherein each row in the index table includes a piece of the one or more pieces of data and the identifier key of the row of the data table from which the piece of data was indexed;

shard the index table into splits, wherein the sharding includes assigning each row of the index table into one of the splits based on the identifier key of the data table from which the piece of data in the respective row was indexed;

sharding the one or more rows from the data table, such that each row of the one or more rows of the data table is together with the individual row of the index table to which the pieces of data of the respective row of the data table were indexed; and

store the splits into two or more portions of the distributed storage system.

11. The system of claim 1 , wherein the one or more rows from the data table are stored in the same split as the individual row of the index table to which the pieces of data of the respective row of the data table were indexed.

12. The system of claim 10 , wherein the data in the data table is in one or more columns of the data table.

13. The system of claim 10 , wherein the identifier key includes a randomly generated number, and

the splits are sorted by the timestamp.

14. The system of claim 10 , wherein the identifier key includes a timestamp, and

the splits are sorted by the timestamp.

15. The system of claim 10 , wherein storing the splits into two or more portions of the distributed storage system include storing a first split into a first portion of the two or more portions of the distributed storage system and a second split into a second portion of the two or more portions of the distributed storage system.

16. The system of claim 15 , wherein, in response to receiving the request to retrieve one or more keys associated with the indexed pieces of data, identifying in the first split, by a first server of the distributed data system, and in the second split, by a second server of the distributed data system, the one or more keys associated with the indexed pieces of data;

merging the identified keys from the first and second splits;

and outputting, by the distributed data system, the merged keys.

17. The system of claim 10 , wherein each row in the data table gets indexed into the index table transactionally in a relational online database stored in the distributed storage system.

18. A non-transitory computer-readable medium storing instructions, which when executed by one or more processors, cause the one or more processors to:

receive a data table including one or more rows and a plurality of columns, wherein each row corresponding to a first column of the plurality of columns includes an identifier key and second and third columns of the plurality of columns each include one or more pieces of data;

index each piece the one or more pieces of data in the second column in the data table into individual rows and columns of a first index table, wherein each row in the index table includes a piece of the one or more pieces of data in the second column and the identifier key of the row of the data table from which the piece of data was indexed;

index each piece of the one or more pieces of data in the third column in the data table into individual rows and columns of a second index table, wherein each row in the index table includes a piece of the one or more pieces of data in the third column and the identifier key of the row of the data table from which the piece of data was indexed;

shard the first index table and the second index into splits, wherein the sharding includes assigning each row of the first and second index tables into one of the splits based on the identifier key of the data table from which the piece of data in the respective row was indexed;

shard the one or more rows from the data table, such that each row of the one or more rows of the data table is together with the individual row of the index table to which the pieces of data of the respective row of the data table were indexed; and

store the splits into two or more portions of a distributed storage system.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 1, 2021
From: KHESIN, ALEXANDER; LLOYD, ALEXANDER; KANTHAK, SEBASTIAN
To: GOOGLE LLC
Reel/Frame 057350/0711 →
Continuity (2)
Provisional Application 62821156 · Mar 20, 2019
Related Publication 20220019568A1 · Jan 20, 2022