IP Library › Granted Patent US 11,288,285
Granted Patent B2
US 11,288,285 · App. 16/682,513 · Granted Mar 29, 2022

System and method for switching from consistent database to an eventual consistent database replica in real time while preventing reads of past versions of the data

Inventors: Pavel Labovich (Bothell, WA); Yuly Suvorov (Kirkland, WA); Eleanor Wong (Seattle, WA); Vikas Yadav (Kirkland, WA); Denis Seniuc (Kenmore, WA)
Assignee: Google LLC
G06F16/27G06F16/2379G06F16/273
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,288,285
App. No.
16/682,513
Granted
Mar 29, 2022
Kind
B2
Abstract

The present disclosure provides for consistent reads in a global database that is replicated to one or more global clones. A state machine is implemented, and executed independently, for each project in each region. Based on the state of a project when a read request is received, the read request will be served by the global database, served by the global clone, or ignored as an invalid request.

Claims (53)

1. A method, comprising:

enabling a global clone in a first region for a project, wherein enabling the global clone comprises receiving data for the project from a global database at the global clone for replication;

setting, by one or more processors in the first region, a state for the project to a pending state;

recording, by the one or more processors in the first region, a timestamp corresponding to a time the state was set to the pending state;

receiving, by the one or more processors in the first region, a request to read data for the project; and

upon determining that the state for the project is in the pending state, redirecting the request to the global database at a time corresponding to the timestamp.

2. The method of claim 1 , further comprising:

determining, by the one or more processors in the first region, whether the global clone has been updated with the same data as in the global database as of the time of the timestamp; and

upon determining that the global clone has been updated with the same data, changing the state for the project to a ready state.

3. The method of claim 2 , further comprising observing, by the one or more processors in the first region, transactions for the project when the project is in the pending state; wherein the determining whether the global clone has been updated is in response to observing transactions for the project.

4. The method of claim 3 , wherein the transactions comprise write transaction to the global database for the project.

5. The method of claim 2 , further comprising:

receiving, by the one or more processors in the first region, a second request to read data from the project; and

upon determining that the project is in the ready state, fulfilling the request using data from the global clone.

6. The method of claim 2 , further comprising:

changing the state for the project from the ready state back to the pending state; and

recording a second timestamp for the time of the change from the ready state to the pending state.

7. The method of claim 1 , wherein recording the timestamp comprises appending the timestamp in a row in a data table in the global clone or in a region database.

8. The method of claim 7 , further comprising recording the timestamp along with an indication of the state and an identifier for the project.

9. A system, comprising:

a global clone in a first region, the global clone configured to replicate data from a global database for a project; and

one or more computing devices configured to:

receive data for the project from the global database at the global clone for replication;

set a state for the project to a pending state;

record a timestamp corresponding to a time the state was set to the pending state;

receive a request to read data for the project; and

upon determining that the state for the project is in the pending state, redirect the request to the global database at a time corresponding to the timestamp.

10. The system of claim 9 , wherein the one or more computing devices are further configured to:

determine whether the global clone has been updated with the same data as in the global database as of the time of the timestamp; and

upon determining that the global clone has been updated with the same data, change the state for the project to a ready state.

11. The system of claim 10 , wherein the one or more computing devices are further configured to observe transactions for the project when the project is in the pending state, wherein determining whether the global clone has been updated is responsive to the observing.

12. The system of claim 11 , wherein the transactions comprise write transaction to the global database for the project.

13. The system of claim 10 , wherein the one or more computing devices are further configured to:

receive a second request to read data from the project; and

upon determining that the project is in the ready state, fulfil the request using data from the global clone.

14. The system of claim 10 , wherein the one or more computing devices are further configured to:

change the state for the project from the ready state back to the pending state; and

record a second timestamp for the time of the change from the ready state to the pending state.

15. The system of claim 9 , wherein recording the timestamp comprises appending the timestamp in a row in a data table in the global clone or in a region database.

16. The system of claim 15 , wherein the one or more computing devices are further configured to record the timestamp along with an indication of the state and an identifier for the project.

17. A non-transitory computer-readable medium storing instructions executable by one or more processors for performing a method of serving read requests to a global clone, the method comprising:

receiving data for a project from a global database at the global clone for replication;

setting a state for the project to a pending state;

recording a timestamp corresponding to a time the state was set to the pending state;

receiving a request to read data for the project; and

upon determining that the state for the project is in the pending state, redirecting the request to the global database at a time corresponding to the timestamp.

18. The computer-readable medium of claim 17 , wherein execution of the instructions further provides for:

determining whether the global clone has been updated with the same data as in the global database as of the time of the timestamp; and

upon determining that the global clone has been updated with the same data, changing a state for the project to a ready state.

19. The computer-readable medium of claim 18 , wherein execution of the instructions further provides for observing transactions for the project when the project is in the pending state; wherein the determining whether the global clone has been updated is in response to observing transactions for the project.

20. The computer-readable medium of claim 18 , wherein execution of the instructions further provides for:

receiving a second request to read data from the project; and

upon determining that the project is in the ready state, fulfilling the request using data from the global clone.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 14, 2019
From: LABOVICH, PAVEL; SUVOROV, YULY; WONG, ELEANOR; YADAV, VIKAS; SENIUC, DENIS
To: GOOGLE LLC
Reel/Frame 051005/0478 →
Continuity (1)
Related Publication 20210141802A1 · May 13, 2021