Slave consistency in a synchronous replication environment
First Claim
1. A method for replicating data in a distributed transactional system, comprising:
- at a first node of a cluster, committing a per-transaction write set that comprises a plurality of write operations that are performed against a first database maintained by the first node;
replicating one or more per-transaction write sets from the first node to a second node of the cluster; and
upon receiving a read query at the second node, the second node performing;
parsing the read query to identify a read set,calculating a write set conflict window for the read query, andupon determining that the read set conflicts with one or more write sets in the write set conflict window, waiting to process the read query until all write sets in the write set conflict window that conflict with the read query are committed.
4 Assignments
0 Petitions
Accused Products
Abstract
Approaches for replicating data in a distributed transactional system. At a first node of a cluster, a per-transaction write set, comprising a plurality of write operations, is committed against a first MySQL database. One or more per-transaction write sets are replicated from the first node to a second node. Upon receiving a read query, the second node parses the read query to identify a read set, calculates a write set conflict window for the read query, and upon determining that the read set conflicts with one or more write sets in the write set conflict window, waits to process the read query until all conflicting write sets are committed. However, upon determining that the read set does not conflict any write sets in the write set conflict window, the read query is processed without first committing any write transactions in the write set conflict window for the read query.
160 Citations
18 Claims
-
1. A method for replicating data in a distributed transactional system, comprising:
-
at a first node of a cluster, committing a per-transaction write set that comprises a plurality of write operations that are performed against a first database maintained by the first node; replicating one or more per-transaction write sets from the first node to a second node of the cluster; and upon receiving a read query at the second node, the second node performing; parsing the read query to identify a read set, calculating a write set conflict window for the read query, and upon determining that the read set conflicts with one or more write sets in the write set conflict window, waiting to process the read query until all write sets in the write set conflict window that conflict with the read query are committed. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory machine readable storage medium storing one or more sequences of instructions for replicating data in a distributed transactional system, wherein execution of the one or more sequences of instructions causes:
-
at a first node of a cluster, committing a per-transaction write set that comprises a plurality of write operations that are performed against a first database maintained by the first node; replicating one or more per-transaction write sets from the first node to a second node of the cluster; and upon receiving a read query at the second node, the second node performing; parsing the read query to identify a read set, calculating a write set conflict window for the read query, and upon determining that the read set conflicts with one or more write sets in the write set conflict window, waiting to process the read query until all write sets in the write set conflict window that conflict with the read query are committed. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A system for replicating data in a distributed transactional system, comprising:
-
one or more processors; and a machine readable storage medium storing one or more sequences of instructions, which when executed by the one or more processors, cause; at a first node of a cluster, committing a per-transaction write set that comprises a plurality of write operations that are performed against a first database maintained by the first node; replicating one or more per-transaction write sets from the first node to a second node of the cluster; and upon receiving a read query at the second node, the second node performing; parsing the read query to identify a read set, calculating a write set conflict window for the read query, and upon determining that the read set conflicts with one or more write sets in the write set conflict window, waiting to process the read query until all write sets in the write set conflict window that conflict with the read query are committed. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification