IP Library Granted Patent US 12,380,092
Granted Patent B1
US 12,380,092 · App. 18/236,995 · Granted Aug 5, 2025

Ensuring globally consistent transactions

Inventors: Wilson Cheng-Yi Hsieh (Syosset, NY); Alexander Lloyd (New York, NY); Peter Hochschild (New York, NY); Michael James Boyer Epstein (Brooklyn, NY); Sean Quinlan (Palo Alto, CA)
Assignee: Google LLC
G06F16/2379G06F9/466G06F16/148G06F16/2322G06F16/2477
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,380,092
App. No.
18/236,995
Granted
Aug 5, 2025
Kind
B1
Abstract

The present technology proposes techniques for ensuring globally consistent transactions. This technology may allow distributed systems to ensure the causal order of read and write transactions across different partitions of a distributed database. By assigning causally generated timestamps to the transactions based on one or more globally coherent time services, the timestamps can be used to preserve and represent the causal order of the transactions in the distributed system. In this regard, certain transactions may wait for a period of time after choosing a timestamp in order to delay the start of any second transaction that might depend on it. The wait may ensure that the effects of the first transaction are not made visible until its timestamp is guaranteed to be in the past. This may ensure that a consistent snapshot of the distributed database can be determined for any past timestamp.

Claims (57)

1. A distributed system having one or more processors and one or more storage devices, the distributed system comprising:

one or more time masters;

a time synchronization daemon in communication with the one or more time masters, the time synchronization daemon configured to synchronize local time by:

periodically querying the one or more time masters;

tracking round-trip delays associated with querying the one or more time masters, each round-trip delay indicating an amount of time between sending a query to one of the time masters and receiving a response to the query from the one of the time masters; and

calculating a current-time interval based on the round-trip delays; and

a library interface in communication with the one or more time masters and the time synchronization daemon, the library interface configured to provide applications with the current-time interval that contains a current true time for causally timestamping transactions occurring across different geographic locations.

2. The distributed system of claim 1 , wherein the one or more time masters are deployed at multiple host machines.

3. The distributed system of claim 1 , wherein the time synchronization daemon is further configured to calculate synchronization offset intervals relative to each of the one or more time masters based on tracking the round-trip delays.

4. The distributed system of claim 1 , wherein the time synchronization daemon is further configured to:

receive, from the one or more time masters, responses to periodic time queries, wherein the received responses include response timestamps generated by the one or more time masters;

calculate, for each of the received responses, a time offset interval, wherein a length of time duration of the time offset interval represents a level of uncertainty associated with the query to and from a particular time master; and

determine an agreement validated offset interval consistent among a selected group of the one or more time masters based on the calculated time offset intervals.

5. The distributed system of claim 4 , wherein the time synchronization daemon is further configured to:

identify the time masters outside of the selected group as producing inaccurate timestamps; and

reject time offset intervals from the identified time masters.

6. The distributed system of claim 4 , wherein the time synchronization daemon is further configured to:

identify the time masters within the selected groups as producing accurate timestamps; and

validate time offset intervals from the identified time masters.

7. The distributed system of claim 6 , wherein the library interface is further configured to transmit the validated time offset intervals to the applications.

8. A method for synchronizing one or more time masters of a distributed system, the method comprising:

synchronizing, by a time synchronization daemon, local time by:

periodically querying the one or more time masters;

tracking round-trip delays associated with querying the one or more time masters, each round-trip delay indicating an amount of time between sending a query to one of the time masters and receiving a response to the query from the one of the time masters; and

calculating a current-time interval based on the round-trip delays; and

providing, by a library interface, applications with the current-time interval that contains a current true time for causally timestamping transactions occurring across different geographic locations.

9. The method of claim 8 , wherein the one or more time masters are deployed at multiple host machines.

10. The method of claim 8 , further comprising calculating, by the time synchronization daemon, synchronization offset intervals relative to each of the one or more time masters based on tracking the round-trip delays.

11. The method of claim 8 , further comprising:

receiving, by the time synchronization daemon, from the one or more time masters, responses to periodic time queries, wherein the received responses include response timestamps generated by the one or more time masters;

calculating, by the time synchronization daemon, for each of the received responses, a time offset interval, wherein a length of time duration of the time offset interval represents a level of uncertainty associated with the query to and from a particular time master; and

determining, by the time synchronization daemon, an agreement validated offset interval consistent among a selected group of the one or more time masters based on the calculated time offset intervals.

12. The method of claim 11 , further comprising:

identifying, by the time synchronization daemon, the time masters outside of the selected group as producing inaccurate timestamps; and

rejecting, by the time synchronization daemon, time offset intervals from the identified time masters.

13. The method of claim 11 , further comprising:

identifying, by the time synchronization daemon, the time masters within the selected groups as producing accurate timestamps; and

validating, by the time synchronization daemon, time offset intervals from the identified time masters.

14. The method of claim 13 , further comprising transmitting, by the library interface, the validated time offset intervals to the applications.

15. A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform a method for synchronizing one or more time masters of a distributed system, the method comprising:

synchronizing, by a time synchronization daemon, local time by:

periodically querying the one or more time masters;

tracking round-trip delays associated with querying the one or more time masters, each round-trip delay indicating an amount of time between sending a query to one of the time masters and receiving a response to the query from the one of the time masters; and

calculating a current-time interval based on the round-trip delays; and

providing, by a library interface, applications with the current-time interval that contains a current true time for causally timestamping transactions occurring across different geographic locations.

16. The non-transitory computer-readable medium of claim 15 , wherein the method further comprises calculating, by the time synchronization daemon, synchronization offset intervals relative to each of the one or more time masters based on tracking the round-trip delays.

17. The non-transitory computer-readable medium of claim 15 , wherein the method further comprises:

receiving, by the time synchronization daemon, from the one or more time masters, responses to periodic time queries, wherein the received responses include response timestamps generated by the one or more time masters;

calculating, by the time synchronization daemon, for each of the received responses, a time offset interval, wherein a length of time duration of the time offset interval represents a level of uncertainty associated with the query to and from a particular time master; and

determining, by the time synchronization daemon, an agreement validated offset interval consistent among a selected group of the one or more time masters based on the calculated time offset intervals.

18. The non-transitory computer-readable medium of claim 17 , wherein the method further comprises:

identifying, by the time synchronization daemon, the time masters outside of the selected group as producing inaccurate timestamps; and

rejecting, by the time synchronization daemon, time offset intervals from the identified time masters.

19. The non-transitory computer-readable medium of claim 17 , wherein the method further comprises:

identifying, by the time synchronization daemon, the time masters within the selected groups as producing accurate timestamps; and

validating, by the time synchronization daemon, time offset intervals from the identified time masters.

20. The non-transitory computer-readable medium of claim 19 , wherein the method further comprises transmitting, by the library interface, the validated time offset intervals to the applications.

Assignments (2)
CHANGE OF NAME Recorded Aug 24, 2023
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 064690/0398 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2023
From: HSIEH, WILSON CHENG-YI; LLOYD, ALEXANDER; HOCHSCHILD, PETER; EPSTEIN, MICHAEL JAMES BOYER; QUINLAN, SEAN
To: GOOGLE INC.
Reel/Frame 064676/0037 →
Continuity (5)
Continuation 17875780 · Jul 28, 2022
Continuation 16023326 · Jun 29, 2018
Continuation 15358428 · Nov 22, 2016
Continuation 13905637 · May 30, 2013
Provisional Application 61655386 · Jun 4, 2012
References Cited (31)
US 5504899A · Raz · 1996 [cited by applicant]
US 6052363A · Koch · 2000 [cited by examiner]
US 6581110B1 · Harif et al. · 2003 [cited by applicant]
US 7362767B2 · Orberk et al. · 2008 [cited by applicant]
US 8938636B1 · Hochschild et al. · 2015 [cited by applicant]
US 9203600B1 · Hochschild et al. · 2015 [cited by applicant]
US 9915970B1 · Hochschild et al. · 2018 [cited by applicant]
US 10775837B1 · Hochschild et al. · 2020 [cited by applicant]
US 11353917B1 · Hochschild et al. · 2022 [cited by applicant]
US 11442925B1 · Hsieh · 2022 [cited by applicant]
US 20020036984A1 · Chiussi et al. · 2002 [cited by applicant]
US 20050210153A1 · Rich et al. · 2005 [cited by applicant]
US 20050210306A1 · Rich et al. · 2005 [cited by applicant]
US 20070047591A1 · Senthilnathan et al. · 2007 [cited by applicant]
US 20070239356A1 · Woz · 2007 [cited by applicant]
US 20080175275A1 · Garner · 2008 [cited by applicant]
US 20080244094A1 · Rich et al. · 2008 [cited by applicant]
US 20080313496A1 · Prabhakaran · 2008 [cited by examiner]
US 20090012932A1 · Romem et al. · 2009 [cited by applicant]
US 20090022089A1 · Rudrapatna · 2009 [cited by applicant]
US 20090089078A1 · Bursey · 2009 [cited by applicant]
US 20090310593A1 · Sheynblat et al. · 2009 [cited by applicant]
US 20100082772A1 · Suzuki · 2010 [cited by applicant]
US 20100185781A1 · Anderson · 2010 [cited by applicant]
US 20110023044A1 · Krutyolkin et al. · 2011 [cited by applicant]
US 20120102006A1 · Larson · 2012 [cited by examiner]
US 20120275333A1 · Cociglio · 2012 [cited by applicant]
US 20130034197A1 · Aweya et al. · 2013 [cited by applicant]
US 20140006458A1 · Hsieh et al. · 2014 [cited by applicant]
US 20150127978A1 · Cui et al. · 2015 [cited by applicant]
Alexander Thomson and Daniel J. Abadi, The Case for Determinism in Database Systems, 2010, 11 pages. [cited by applicant]