IP Library Granted Patent US 12,050,622
Granted Patent B2
US 12,050,622 · App. 16/858,619 · Granted Jul 30, 2024

Replicating big data

Inventors: Wangyuan Zhang (Fremont, CA); Li Moore (Mountain View, CA)
Assignee: Google LLC
G06F16/275G06F16/134G06F16/1748G06F16/182G06F16/27G06F16/25
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 12,050,622
App. No.
16/858,619
Granted
Jul 30, 2024
Kind
B2
Abstract

A method includes identifying a first table including data. The first table has associated metadata, an associated replication state, an associated replication log file including replication logs logging mutations of the first table, and an associated replication configuration file including a first association that associates the first table with a replication family. The method includes inserting a second association in the replication configuration file that associates a second table having a non-loadable state with the replication family. The association of the second table with the replication family causes persistence of any replication logs in the replication log file that correspond to any mutations of the first table during the existence of the second table. The method further includes generating a third table from the first table, the metadata associated with the first table, and the associated replication state of the first table.

Claims (52)

1. A method comprising:

identifying, by data processing hardware, a first replica table comprising table data, the first replica table having associated metadata defining the first replica table and an associated replication log file comprising logs logging mutations of the first replica table;

generating, by the data processing hardware, a temporary table configured in a non-loadable state, the temporary table not loaded with any data, the non-loadable state preventing any data from loading into the temporary table and preventing garbage collection of any replication logs in the replication log file that correspond to any mutations of the first replica table occurring during an existence of the temporary table;

during the existence of the temporary table:

obtaining, at the data processing hardware, subsequent mutations of the first replica table, the subsequent mutations of the first replica table occurring during the existence of the temporary table; and

based on the existence of the temporary table, persisting, by the data processing hardware, any replication logs in the replication log file that correspond to the subsequent mutations of the first replica table;

generating, by the data processing hardware, a second replica table from the first replica table and the metadata associated with the first replica table, the second replica table not including the subsequent mutations of the first replica table; and

applying, by the data processing hardware, to the second replica table, the subsequent mutations of the first replica table from the persisted replication logs.

2. The method of claim 1 , wherein generating the temporary table comprises generating a temporary association between the first replica table and the temporary table.

3. The method of claim 2 , further comprising removing, by the data processing hardware, the temporary association between the first replica table and the temporary table, the removal of the temporary association removing the persisted replication logs.

4. The method of claim 2 , further comprising deleting, by the data processing hardware, the temporary table after removing the temporary association between the first replica table and the temporary table.

5. The method of claim 2 , wherein applying, to the second replica table, the subsequent mutations of the first replica table from the persisted replication logs comprises, before removing the temporary association:

identifying, as transient mutations, any mutations to the first replica table logged in the replication log file that occurred:

after generating the temporary table and the temporary association, and

before a completion of generating the second replica table; and

applying the transient mutations to the second replica table.

6. The method of claim 1 , wherein the first replica table comprises a replication configuration file comprising replication logs for mutations to all tables associated with the first replica table.

7. The method of claim 1 , further comprising applying, by the data processing hardware, to the second replica table, the mutations of replication logs logged for each table in the replication log file during the existence of the temporary table.

8. The method of claim 1 , wherein the first replica table has an associated replication state comprising a logical clock indicating a most recent time when all mutations of a source replica table were applied to the first replica table, the first replica table being a replication of the source replica table.

9. The method of claim 8 , wherein generating the second replica table comprises:

copying a sorted string table file representing the first replica table;

copying a metadata file comprising the metadata associated with the first replica table;

copying a replication state file comprising a replication state of the first replica table; and

storing in memory hardware in communication with the data processing hardware, the copied sorted string table file, the copied metadata file, and the copied replication state file.

10. The method of claim 1 , wherein the non-loadable state of the temporary table further prevents garbage collection of any replication logs of any replica tables associated with the first replica table occurring during the existence of the temporary table.

11. A system comprising:

data processing hardware; and

memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:

identifying a first replica table comprising table data, the first replica table having associated metadata defining the first replica table and an associated replication log file comprising logs logging mutations of the first replica table;

generating a temporary table configured in a non-loadable state, the temporary table not loaded with any data, the non-loadable state preventing any data from loading into the temporary table and preventing garbage collection of any replication logs in the replication log file that correspond to any mutations of the first replica table occurring during an existence of the temporary table;

during the existence of the temporary table:

obtaining, at the data processing hardware, subsequent mutations of the first replica table, the subsequent mutations of the first replica table occurring during the existence of the temporary table; and

based on the existence of the temporary table, persisting any replication logs in the replication log file that correspond to the subsequent mutations of the first replica table;

generating a second replica table from the first replica table and the metadata associated with the first replica table, the second replica table not including the subsequent mutations of the first replica table; and

applying to the second replica table, the subsequent mutations of the first replica table from the persisted replication logs.

12. The system of claim 11 , wherein generating the temporary table comprises generating a temporary association between the first replica table and the temporary table.

13. The system of claim 12 , wherein the operations further comprise removing the temporary association between the first replica table and the temporary table, the removal of the temporary association removing the persisted replication logs.

14. The system of claim 12 , wherein the operations further comprise deleting the temporary table after removing the temporary association between the first replica table and the temporary table.

15. The system of claim 12 , wherein applying, to the second replica table, the subsequent mutations of the first replica table from the persisted replication logs comprises, before removing the temporary association:

identifying, as transient mutations, any mutations to the first replica table logged in the replication log file that occurred:

after generating the temporary table and the temporary association, and

before a completion of generating the second replica table; and

applying the transient mutations to the second replica table.

16. The system of claim 11 , wherein the first replica table comprises a replication configuration file comprising replication logs for mutations to all tables associated with the first replica table.

17. The system of claim 11 , wherein the operations further comprise applying, to the second replica table, the mutations of replication logs logged for each table in the replication log file during the existence of the temporary table.

18. The system of claim 11 , wherein the first replica table has an associated replication state comprising a logical clock indicating a most recent time when all mutations of a source replica table were applied to the first replica table, the first replica table being a replication of the source replica table.

19. The system of claim 18 , wherein generating the second replica table comprises:

copying a sorted string table file representing the first replica table;

copying a metadata file comprising the metadata associated with the first replica table;

copying a replication state file comprising a replication state of the first replica table; and

storing in memory hardware in communication with the data processing hardware, the copied sorted string table file, the copied metadata file, and the copied replication state file.

20. The system of claim 11 , wherein the non-loadable state of the temporary table further prevents garbage collection of any replication logs of any replica tables associated with the first replica table occurring during the existence of the temporary table.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 20, 2024
From: ZHANG, WANGYUAN; MOORE, LI
To: GOOGLE, INC.
Reel/Frame 066499/0412 →
CHANGE OF NAME Recorded Feb 20, 2024
From: GOOGLE, INC.
To: GOOGLE LLC
Reel/Frame 066628/0662 →
Continuity (2)
Continuation 14813181 · Jul 30, 2015
Related Publication 20200265068A1 · Aug 20, 2020