Conflict Resolution Policy

From Ilianko

← Back to DP-420 Terminology Reference

Category: Data Distribution & Consistency

Summary: Defines how concurrent multi-region write conflicts are resolved (e.g., LWW).

Overview

A conflict resolution policy defines how Azure Cosmos DB for NoSQL resolves write conflicts that occur when multi-region writes are enabled and the same item is updated concurrently in different regions. Options include Last-Writer-Wins (LWW, based on a numeric property, defaulting to timestamp), or a custom conflict resolution stored procedure for application-specific merge logic.

More Info & Links

DP-420 Style Practice Questions

Q1. Which built-in conflict resolution policy resolves conflicts based on a numeric property, defaulting to the write timestamp?

  • A. Last-Writer-Wins (LWW)
  • B. First-Writer-Wins
  • C. Manual resolution only
  • D. Round-robin resolution

Q2. How can you implement custom, application-specific logic for resolving write conflicts?

  • A. By implementing a custom conflict resolution stored procedure
  • B. By disabling multi-region writes entirely
  • C. By setting the consistency level to Strong
  • D. By enabling TTL on the container

Answer Key

Answers are listed at the very end so you can attempt the questions first.

  • Q1 (Conflict Resolution Policy): A. Last-Writer-Wins (LWW) — Last-Writer-Wins (LWW) resolves conflicts using a numeric property, defaulting to the system timestamp if none is specified.
  • Q2 (Conflict Resolution Policy): A. By implementing a custom conflict resolution stored procedure — A custom conflict resolution stored procedure allows you to implement your own merge/resolution logic for conflicting writes.

DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page