Conflicts not appearing in the Conflict Feed

João Pereira 0 Reputation points
2025-04-05T18:31:26.2533333+00:00

Hello everyone!

I'm currently trying to understand how to generate conflicts in order to test some stored procedures I've developed to solve conflicts. Right now I'm not testing the stored procedures, I'm just trying to understand how can I generate conflicts. Well, I'm using the Java SDK, and when I perform multiple updates in two different regions, I can generate a couple of conflicts (I am printing the conflict feed in my code). The problem is that those conflicts don't appear in the conflict feed in the Azure Portal.

My question is if this is a bug from the portal or can some of my updates being upserting the conflicts?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,843 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PratikLad 800 Reputation points Microsoft External Staff
    2025-04-14T12:33:39.2366667+00:00

    Hi João Pereira,

    To simulate a conflict in Azure Cosmos DB, you need to perform simultaneous updates to the same item in different regions. This kind of operation can result in a conflict, but whether that conflict is stored and visible in the conflict feed depends on your conflict resolution policy.

    By default, Cosmos DB uses the Last Write Wins (LWW) strategy. With LWW, Cosmos automatically resolves the conflict by keeping the version of the item with the highest value for the configured conflict resolution path (usually a timestamp). This means the conflict is resolved automatically and not stored, so it won't appear in the conflict feed, either in the portal or via the SDK.

    Conflicts that can occur include:

    • Insert conflicts – when the same ID is inserted at the same time in different regions.
    • Replace conflicts – when the same item is updated in multiple regions simultaneously.
    • Delete conflicts – when one region deletes an item while another updates it.

    Since you're seeing conflicts in the SDK but not in the portal, it's likely because your updates are being resolved automatically using LWW. This is expected behavior and not a bug in the portal. If you want to see conflicts in the conflict feed, you need to configure your container with a custom conflict resolution policy that stores conflicts and optionally uses stored procedures to resolve them manually.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.