System and method for efficient multi-master replication
First Claim
1. A method for synchronizing a first replica of a data set and a second replica of the data set, each of the first and second replicas having an associated identifier and counter whereby, for each change made to an element in the data set, a change bucket is assigned to the element, the change bucket including an associated identifier and a count of an associated counter at the time of the change, the method comprising:
- receiving at the second replica a first replication state vector maintained at the first replica, the first replication state vector including a first change bucket corresponding to a most recent change made at the first replica and a second change bucket corresponding to a most recent change made at the second replica and replicated at the first replica;
comparing at the second replica the first replication state vector and a second replication state vector maintained at the second replica, the second replication state vector including a first change bucket corresponding to a most recent change made at the first replica and replicated at the second replica and a second change bucket corresponding to a most recent change made at the second replica;
identifying changes to be replicated at the first replica, the changes to be replicated at the first replica each having a change bucket with the identifier of the second replica and a count greater than the count of the second change bucket of the first replication state vector and less than or equal to the count of the second change bucket of the second replication state vector; and
sending to the first replica the changes to be replicated at the first replica and their corresponding change buckets.
2 Assignments
0 Petitions
Accused Products
Abstract
Each replica in a group of replicas of a data set is assigned a unique identifier and maintains an independent counter. When a change is made to an element in the data set, a change bucket, is assigned to the changed data element. The change bucket includes the identifier of the replica at which the change was made and the count of the counter of the replica at which the change was made at the time of the change. Each replica also maintains an array of change buckets each corresponding to the most recent changes replicated from the other replicas in the group. When replicas synchronize, the replicas exchange and compare replication state vectors to identify changes present at a replica and not present at another replica. Once such changes are identified, they and their corresponding change buckets are sent to the other replica to be replicated. Once new changes are replicated, the replicas join their replication state vectors to reflect that they are synchronized.
-
Citations
24 Claims
-
1. A method for synchronizing a first replica of a data set and a second replica of the data set, each of the first and second replicas having an associated identifier and counter whereby, for each change made to an element in the data set, a change bucket is assigned to the element, the change bucket including an associated identifier and a count of an associated counter at the time of the change, the method comprising:
-
receiving at the second replica a first replication state vector maintained at the first replica, the first replication state vector including a first change bucket corresponding to a most recent change made at the first replica and a second change bucket corresponding to a most recent change made at the second replica and replicated at the first replica;
comparing at the second replica the first replication state vector and a second replication state vector maintained at the second replica, the second replication state vector including a first change bucket corresponding to a most recent change made at the first replica and replicated at the second replica and a second change bucket corresponding to a most recent change made at the second replica;
identifying changes to be replicated at the first replica, the changes to be replicated at the first replica each having a change bucket with the identifier of the second replica and a count greater than the count of the second change bucket of the first replication state vector and less than or equal to the count of the second change bucket of the second replication state vector; and
sending to the first replica the changes to be replicated at the first replica and their corresponding change buckets. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer readable medium for synchronizing a first replica of a data set and a second replica of the data set, each of the first and second replica having an associated identifier and counter whereby, for each change made to an element in the data set, a change bucket is assigned to the element, the change bucket including an associated identifier and a count of an associated counter at the time of the change, the computer readable medium comprising computer executable instructions for performing the following steps:
-
receiving at the second replica a first replication state vector maintained at the first replica, the first replication state vector including a first change bucket corresponding to a most recent change made at the first replica and a second change bucket corresponding to a most recent change made at the second replica and replicated at the first replica;
comparing at the second replica the first replication state vector and a second replication state vector maintained at the second replica, the second replication state vector including a first change bucket corresponding to a most recent change made at the first replica and replicated at the second replica and a second change bucket corresponding to a most recent change made at the second replica;
identifying changes to be replicated at the first replica, the changes to be replicated at the first replica each having a change bucket with the identifier of the second replica and a count greater than the count of the second change bucket of the first replication state vector and less than or equal to the count of the second change bucket of the second replication state vector; and
sending to the first replica the new changes made at the second replica and their corresponding change buckets. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system for data replication, comprising:
-
a first computing device comprising a memory for storing a data set, a first identifier, and a first counter whereby, for each change made to an element in the data set at the first replica a change bucket is assigned to the element, the change bucket including the first identifier and a count of the first counter at the time of the change;
a second computing device comprising a memory for storing a data set, a second identifier, and a second counter whereby, for each change made to an element in the data set at the second replica a change bucket is assigned to the element, the change bucket including the second identifier and a count of the second counter at the time of the change;
a first replication state vector maintained at the first computing device, the first replication state vector including a first change bucket corresponding to a most recent change made at the first replica and a second change bucket corresponding to a most recent change made at the second replica and received at the first replica; and
a second replication state vector maintained at the second computing device, the second replication state vector including a first change bucket corresponding to a most recent change made at the first replica and received at the second replica and a second change bucket corresponding to a most recent change made at the second replica. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification