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 |
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.
|