US 12,298,961 B1
Increasing commit times at database shards for implementing consistency and isolation for distributed transactions
Jin Chen, Toronto (CA); Anand Kumar Thakur, Snohomish, WA (US); Upendra Govindagowda, Renton, WA (US); Gaurav Kumar Gupta, Waterloo (CA); David Charles Wein, Shoreline, WA (US); Saleem Mohideen, Saratoga, CA (US); and Alexandre Olegovich Verbitski, Woodinville, WA (US)
Assigned to Amazon Technologies, Inc., Seattle, WA (US)
Filed by Amazon Technologies, Inc., Seattle, WA (US)
Filed on Sep. 29, 2023, as Appl. No. 18/478,069.
Int. Cl. G06F 17/00 (2019.01); G06F 7/00 (2006.01); G06F 16/23 (2019.01)
CPC G06F 16/2322 (2019.01) 20 Claims
OG exemplary drawing
 
1. A system, comprising:
a distributed database system that provides access to a database, wherein the distributed database system comprises:
one or more request routing nodes, respectively comprising a processor and a memory;
a plurality of database nodes, respectively comprising a further processor and a further memory, wherein individual ones of the plurality of database engine nodes are respectively assigned to different shards of the database;
wherein a first one of the one or more request routing nodes is configured to:
receive a request to access the database;
determine one or more of the shards to perform the request;
determine a snapshot time for the request to access the database according to a time synchronization service, wherein the snapshot time is described according to a range of time, wherein the range of time is specified starting from an earliest timestamp and ending with a latest timestamp;
send the request to the respectively assigned database nodes of the determined one or more shards along with the snapshot time;
wherein the respectively assigned database nodes of the determined one or more shards are configured to:
receive the request to access the database and the snapshot time;
determine that that the latest timestamp in the range of time that describes the snapshot time is greater than a current timestamp in a clock time stored in a shared memory accessible for performing requests received from the one or more request routing nodes;
responsive to the determination, update the clock time in the shared memory to store the latest timestamp in the range of time;
select one version of a plurality of versions of a tuple stored in the shard of the database to use for performing the access request according to the snapshot time for performing the request; and
return a response to the first one of the one or more request routing nodes according to the performance of the request based, at least in part, on using the selected one version of the plurality of versions of the tuple.