IP Library Granted Patent US 8,694,733
Granted Patent B2
US 8,694,733 · App. 13/399,982 · Granted Apr 8, 2014

Slave consistency in a synchronous replication environment

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 8,694,733
App. No.
13/399,982
Granted
Apr 8, 2014
Kind
B2
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.

Claims (42)

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.

2. The method of claim 1 , wherein replicating is performed synchronously such that a write transaction is not committed at the first node until the first node receives acknowledgement, from the second node, that the write transaction is received at the second node.

3. The method of claim 1 , wherein the first node operates as a master and the second node operates as a slave.

4. The method of claim 1 , wherein the one or more per-transaction write sets, once received at the second node, are stored in a write-set queue prior to being processed by the second node.

5. The method of claim 1 , further comprising:

upon the second node determining that the read set does not conflict with any write sets in the write set conflict window for the read query, processing the read query without first committing any write transactions in the write set conflict window for the read query.

6. The method of claim 1 , further comprising:

replicating the one or more per-transaction write sets from the first node to one or more other nodes of the cluster besides the second node.

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.

8. The non-transitory machine readable storage medium of claim 7 , wherein replicating is performed synchronously such that a write transaction is not committed at the first node until the first node receives acknowledgement, from the second node, that the write transaction is received at the second node.

9. The non-transitory machine readable storage medium of claim 7 , wherein the first node operates as a master and the second node operates as a slave.

10. The non-transitory machine readable storage medium of claim 7 , wherein the one or more per-transaction write sets, once received at the second node, are stored in a write-set queue prior to being processed by the second node.

11. The non-transitory machine readable storage medium of claim 7 , wherein execution of the one or more sequences of instructions further causes:

upon the second node determining that the read set does not conflict with any write sets in the write set conflict window for the read query, processing the read query without first committing any write transactions in the write set conflict window for the read query.

12. The non-transitory machine readable storage medium of claim 7 , wherein execution of the one or more sequences of instructions further causes replicating the one or more per-transaction write sets from the first node to one or more other nodes of the cluster besides the second node.

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.

14. The system of claim 13 , wherein replicating is performed synchronously such that a write transaction is not committed at the first node until the first node receives acknowledgement, from the second node, that the write transaction is received at the second node.

15. The system of claim 13 , wherein the first node operates as a master and the second node operates as a slave.

16. The system of claim 13 , wherein the one or more per-transaction write sets, once received at the second node, are, stored in a write-set queue prior to being processed by the second node.

17. The system of claim 13 , wherein execution of the one or more sequences of instructions further causes:

upon the second node determining that the read set does not conflict with any write sets in the write set conflict window for the read query, processing the read query without first committing any write transactions in the write set conflict window for the read query.

18. The system of claim 13 , wherein execution of the one or more sequences of instructions further causes replicating the one or more per-transaction write sets from the first node to one or more other nodes of the cluster besides the second node.

Assignments (4)
CHANGE OF NAME Recorded May 25, 2016
From: SANDISK TECHNOLOGIES INC
To: SANDISK TECHNOLOGIES LLC
Reel/Frame 038807/0898 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 29, 2016
From: SANDISK ENTERPRISE IP LLC
To: SANDISK TECHNOLOGIES INC.
Reel/Frame 038295/0225 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 2, 2012
From: SCHOONER INFORMATION TECHNOLOGY, INC.
To: SANDISK ENTERPRISE IP, LLC
Reel/Frame 028710/0950 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 16, 2012
From: KRISHNAN, MANAVALAN; DINKER, DARPAN; GEORGE, JOHANN
To: SCHOONER INFORMATION TECHNOLOGY, INC.
Reel/Frame 027880/0073 →