US 12,032,555 B2
Techniques for synchronous access to database replicas
Zohar Shay, Even Yehuda (IL); Golan Levy, Ramat Gan (IL); and Elad Swisa, Herzeliya (IL)
Assigned to GONG.io Ltd., Ramat Gan (IL)
Filed by GONG.io Ltd., Ramat Gan (IL)
Filed on May 31, 2022, as Appl. No. 17/804,701.
Prior Publication US 2023/0409556 A1, Dec. 21, 2023
Int. Cl. G06F 16/23 (2019.01); G06F 16/27 (2019.01); G06F 16/28 (2019.01)
CPC G06F 16/2365 (2019.01) [G06F 16/2322 (2019.01); G06F 16/2379 (2019.01); G06F 16/275 (2019.01); G06F 16/284 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method for providing consistency in read-after-write operations in a multi-replica relational database system (RDS), comprising:
receiving a read transaction to read data from a database (DB) replica of the multi-replica RDS;
obtaining counter values of DB replicas in the multi-replica RDS, wherein each counter value of a respective DB replica in the multi-replica RDS determines a current version of recent data stored in the respective DB replica;
determining a write replica out of the DB replicas in the multi-replica RDS;
determining if there is an available read replica, wherein a read replica is a replica other than the determined write replica and having a counter value of the read replica that is at least equal to a counter value of the write replica;
waiting, when there is no available read replica, a preconfigured time window to allow all the DB replicas to synchronize with the write replica; and
reading the data from the read replica when the preconfigured time window has elapsed.