You deploy an Azure Cosmos DB SQL API account in two write regions. For the Profiles container, if concurrent updates occur, the most recent change (by a timestamp property) should win. For the Orders container, on conflict you must automatically merge line items rather than losing an update. What should you configure?
Choose an answer
Tap an option to check your answer.
Correct answer: For the Profiles container, set the conflict resolution policy to LastWriterWins using the path /modifiedAt., For the Orders container, set the conflict resolution policy to Custom and register a merge stored procedure that combines conflicting items..
Why this is the answer
The Profiles container requires the most recent change to win, which is precisely what the LastWriterWins conflict resolution policy does when configured with a timestamp path like /modifiedAt. This ensures that the item with the latest modifiedAt value is preserved. For the Orders container, the requirement to automatically merge line items indicates a need for custom logic beyond simple last-writer wins. The Custom conflict resolution policy allows you to register a stored procedure that defines specific merge logic, such as combining arrays of line items from conflicting documents. Manual conflict mode would require client-side intervention for every conflict, which is not automatic as required for the Orders container. A database-level policy would apply the same conflict behavior to both containers, which contradicts the distinct requirements for Profiles and Orders.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed