Chapter 3. Failover and switchback scenarios 35
If there are messages in the receive queue on the secondary server that have not been
drained (item 4 in Figure 3-5), when the secondary server is enabled for updates, then
conflicts may occur on the secondary server between the updates in its receive queue and
the updates occurring on the secondary server.
Figure 3-5 Data loss and potential sources of conflicts
When switchback occurs, then the changes from the secondary server that are replicated
over to the primary server will pass through the receive queue at the primary server (item 3 in
Figure 3-5). These changes may conflict with the changes that may have already occurred at
the primary server just prior to failure but were not replicated over to the secondary server
(items 1 and 2 in Figure 3-5). Additionally, during switchback, any unpropagated changes on
the DB2 log and transmit queue on the primary server (items 1 and 2 in Figure 3-5) may
conflict with changes that may have already occurred at the secondary server after failover
but prior to switchback.
Therefore, it is possible for conflicts to occur on both the primary server during switchback
and the secondary server after failover.
To support the ABC Financials business requirement of failover and switchback, the conflict
rule must be set for the primary server to be designated as the loser. Any conflicts will resolve
in favor of the updates originating at the secondary server, which would represent the most
recent changes to the data.
Note: Data loss refers to transactions that are not propagated and applied to the “target”
table. (Here “target” does not refer to the location of the table but the object of the
replication). Therefore, changes may have originated on the primary server prior to
failover, or originated on the secondary server after failover and prior to switchback.
Important: Identifying the data loss suffered can be critical for certain types of
Attention: The triggering event for failover is assumed to originate external to the Q
replication environment. If the switching of the update workload to the secondary server is
also automated by external processes, then the likelihood that messages in the receive
queue could be drained prior to enabling updating applications is small—conflicts are likely
to occur on the secondary server.