QuestionQ46

Integrate an Azure Cosmos DB solution

You have a database in an Azure Cosmos DB Core (SQL) API account that is configured for multi-region writes.

You need to use the Azure Cosmos DB SDK to implement the conflict resolution policy for a container. The solution must ensure that any conflicts are sent to the conflicts feed.

Solution: Set ConflictResolutionMode to Custom. Set ResolutionProcedure to a custom stored procedure. Configure that custom stored procedure to resolve conflicts by using the conflictingItems parameter.

Does this satisfy the goal?

  • A Yes
  • B No
Explanation

A designated custom conflict-resolution stored procedure resolves detected conflicts automatically, so successfully resolved conflicts do not appear in the conflicts feed. To ensure conflicts are written to that feed, use a custom conflict-resolution policy without a designated stored procedure; conflicts also enter the feed if the designated procedure fails.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!