Propagating Database ChangesTo propagate updates to the slave replicas, the master replica first updates its copy of the database by using the process described in Handling Database Updates . Then, the master replica attempts to propagate the update to each slave replica on its replica list. The replica list contains each slave replica's ID and network address. It also contains the sequence number of the last update that was made to the slave. The master replica always propagates in sequenced numerical order. By examining the sequence number that is associated with a replica in its replica list, and the sequence numbers of the updates that are in its propagation queue, the master can determine which of the updates on its propagation queue must be propagated to which slave. This mechanism helps ensure that the unavailability of a single slave replica does not interfere with updates to the rest of the slave replicas. If the propagation of an update does not succeed on the first attempt, the master replica tries periodically until it succeeds. When the update succeeds, the master updates the sequence number that is associated with the updated replica on its replica list. When an update is propagated to all the slave replicas, the master removes the update from its propagation queue.
|