Sdílet prostřednictvím


CONSTRAINT_CONFLICT_REASON Enumeration

Represents the reasons that a constraint conflict can occur.

typedef enum
{
  CCR_OTHER,
  CCR_COLLISION,
  CCR_NOPARENT,
  CCR_IDENTITY
} CONSTRAINT_CONFLICT_REASON;

Members

Term

Definition

CCR_OTHER

The item or change unit violates some other constraint of the destination replica. The provider can optionally specify the ID of the conflicting item as the conflicting item ID.

CCR_COLLISION

The item cannot be saved because it conflicts with another item in the store, such as an item that has the same name as an existing item. The provider must specify the ID of the destination item as the conflicting item ID.

CCR_NOPARENT

The item cannot be saved in the hierarchical data store because the item requires a parent item that does not exist in the store. The provider can optionally specify the ID of the missing parent as the conflicting item ID.

CCR_IDENTITY

The source replica and the destination replica disagree about the identity of an item. For example, replica X resolves a collision conflict between items with IDs id1 and id2 by merging the items and assigning id1 to the merged item. Replica Y resolves a collision conflict between items with IDs id1 and id2 by renaming the item identified by id1 and keeping both items. Replica X sends the merged item identified by id1 and a merge tombstone that indicates that id2 has been merged into id1. The conflict on id1 is detected and resolved as a concurrency conflict. The conflict on id2 is detected and reported to the synchronization application as an identity conflict by specifying a conflict reason of CCR_IDENTITY. The application determines whether to resolve the conflict by keeping the source change or the destination change.

Remarks

The destination provider uses a member of CONSTRAINT_CONFLICT_REASON to specify the reason for a constraint conflict when it reports a constraint conflict to the change applier. For more information on constraint conflicts, see Detecting and Resolving Constraint Conflicts.

Requirements

Header: Synchronization.h

See Also

Concepts

Sync Framework Core Components