3. Planning Your Replication Scheme : Replication Scheme Design Issues : Collision Design : Collision Modes
 
Share this page                  
Collision Modes
How a Replicator Server acts when it detects a collision depends on the collision mode of the CDDS to which the colliding records belong. The Passive Detection mode involves no action on the part of the Replicator Server. Modes other than Passive Detection require the Replicator Server to search the target database to see if the row it is propagating already exists. If a Replicator Server detects a collision, its subsequent actions are determined by the collision mode and error mode assigned to the CDDS to which the colliding row belongs.
The available collision modes are:
Passive Detection
(Default) This mode detects insert collisions and update and delete collisions where the row to be updated or deleted does not exist. The Replicator Server does not resolve the collision. The collision is an error and the Replicator Server action is dependent on the error mode setting.
This mode requires you to perform manual collision resolution.
Active Detection
This mode detects all collisions, but does not resolve them.
Before propagating the row, the Replicator Server searches the target database to see if the row already exists. If it detects a collision, however, the Replicator Server does not resolve it. The collision is an error and the Replicator Server action is dependent on the error mode setting.
This mode requires you to perform manual collision resolution.
Benign Resolution
This mode detects and resolves benign collisions (when the same row with the same transaction ID arrives at the same target more than once).
Before propagating the row, the Replicator Server searches the target database to see if the row already exists. If the row does exist and it came from the same transaction, the Replicator Server issues a warning message and removes the operation from the distribution queue. Otherwise, the server action is dependent on the error mode setting.
This mode requires you to perform manual collision resolution on all but benign collisions.
Priority Resolution
This mode detects and resolves all collisions according to assigned priorities.
Before propagating the row, the Replicator Server searches the target database to see if the row already exists. If the Replicator Server detects a collision, it resolves it by comparing the priority numbers assigned to the underlying rows. The row with the highest priority number prevails. If the priorities are the same or do not exist, the row with the lower database number survives the collision.
Priority numbers are assigned in a priority collision resolution lookup table. For instructions for creating this lookup table, see chapter “Using Advanced Features.”
In this mode, all collisions are resolved automatically.
Last Write Wins
This mode detects and resolves all collisions according to transaction timestamps.
Before propagating the row, the Replicator Server searches the target database to see if the row already exists. If the Replicator Server detects a collision, it resolves it by comparing the transaction timestamps. The row with the later timestamp prevails.
If the timestamps are identical, the row with the lower database number survives the collision.
In this mode, all collisions are resolved automatically.