Types of conflicts in DXRE and how they are resolved in a Multi-Site environment

Summary:

What are the various types of conflicts that can arise in DXRE, and how can they be resolved?
How are conflicts resolved by the replication engine?  

Solution:

There are 4 types of conflicts:

Type 1 - record updated at both sites since current cutoff date - Newer record is replicated.
Type 1A - record updated to same value at both sites but timestamps are different. Newer record is replicated.
Type V - starter data conflict - results when there is a discrepancy between the data that already existed at each site PRIOR to activation. Because timestamps match in this instance, these conflicts must either be resolved manually, or, you must configure the engine (using the dSetting utility to set PD_RESOLVE_TYPEV_CONFLICT) to automatically resolve them.
Type VI - a record is inserted or updated at one site and deleted at another. If insert at one site and delete at another, the most recent operation prevails. If update at one site and delete at another, the record is deleted - regardless of the order of operations

To resolve a conflict where updates to the same data have occurred at multiple sites since the last replication session, the sites must choose one update and discard the other. By default, the Replication Engine resolves conflicts by keeping the update with the most recent time stamp. A fragment time stamp records the absolute time when a fragment was updated in Coordinated Universal Time (UTC). If the timestamps are identical but the updates conflict, the Replication Engine cannot resolve the conflict.
Manual intervention will be needed.

Refer to the Replication Engine logs for indications and details of conflicts. Conflicts are designated by lines beginning with C.
Example of Type 1 conflict::
C 0130 0321-17:44:04 pdre34305 Type I conflict resolved: Fragment 2 will be updated at partner (Table Customer, key: 123).


Example of Type 1A conflict:
C 0130 0321-17:44:04 pdre27047 CONFLICT: Type Ia: Fragment 2 for table Customer has been altered at both sites (possibly to same value (key: 123)


Example of Type V conflict:
C 0130 0321-17:44:04 pdre27042 CONFLICT: Type V: Starter data in fragment 2 for table Customer is different at the two sites (key: 123).

Example of Type VI conflict (Update - Delete):
C 40e0 0214-09:18:29 pdre27064 CONFLICT: Type VI: A locally-updated record in table serversession has been deleted at the partner site (key: 25309)
C 40e0 0214-09:18:29 Creation date:2/14/2018 7:04:40 AM
C 40e0 0214-09:18:29 Deletion date:2/14/2018 8:14:36 AM
C 40e0 0214-09:18:29 The record will be deleted locally.


Example of Type VI conflict (Insert - Delete):
C 39f4 0817-13:33:34 pdre27065 CONFLICT: Type VIa: A newly-inserted record in table Territories has been deleted at the partner site (key: PDCID(1000001))
C 39f4 0817-13:33:34 Creation date:17-Aug-18 12:32:52 PM
C 39f4 0817-13:33:34 Deletion date:17-Aug-18 12:31:38 PM
C 39f4 0817-13:33:34 The record will be transmitted.

Note: to create this error, had to delete a record at both sites, and recreate at one site with identical PK

You can also specify whether the Replication Engine resolves conflicts that occur during a sites initial replication session. The Replication Engine cannot resolve Type V starter data conflicts using fragment time stamps because any data that is present in the database prior to activation is assigned the same time stamp. You can enable the Replication Engine to resolve starter data conflicts using the dsetting keyword or the Designer database setting PD_RESOLVE_TYPEV_CONFLICT.



Posted - November 1, 2022. This article has been viewed 360 times.
Online URL: https://counterpoint.knowledgebase.co/article.php?id=1361

Powered by PHPKB (Knowledge Base Software)