Skip to content

Commit 4175b37

Browse files
Merge pull request #215264 from seesharprun/cosmos-custom-conflict-resolution
Cosmos DB | Clarify conflict resolution policies
2 parents 6478e3c + b657d9f commit 4175b37

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

articles/cosmos-db/nosql/how-to-manage-conflicts.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ udp_collection = self.try_create_document_collection(
130130

131131
## Create a custom conflict resolution policy using a stored procedure
132132

133-
These samples show how to set up a container with a custom conflict resolution policy with a stored procedure to resolve the conflict. These conflicts don't show up in the conflict feed unless there's an error in your stored procedure. After the policy is created with the container, you need to create the stored procedure. The .NET SDK sample below shows an example. This policy is supported on NoSQL Api only.
133+
These samples show how to set up a container with a custom conflict resolution policy. This policy uses the logic in a stored procedure to resolve the conflict. If a stored procedure is designated to resolve conflicts, conflicts won't show up in the conflict feed unless there's an error in the designated stored procedure.
134+
135+
After the policy is created with the container, you need to create the stored procedure. The .NET SDK sample below shows an example of this workflow. This policy is supported in the API for NoSQL only.
134136

135137
### Sample custom conflict resolution stored procedure
136138

@@ -327,7 +329,7 @@ After your container is created, you must create the `resolver` stored procedure
327329

328330
## Create a custom conflict resolution policy
329331

330-
These samples show how to set up a container with a custom conflict resolution policy. These conflicts show up in the conflict feed.
332+
These samples show how to set up a container with a custom conflict resolution policy. With this implementation, each conflict will show up in the conflict feed. It's up to you to handle the conflicts individually from the conflict feed.
331333

332334
### <a id="create-custom-conflict-resolution-policy-dotnet"></a>.NET SDK
333335

@@ -431,7 +433,11 @@ manual_collection = client.CreateContainer(database['_self'], collection)
431433

432434
## Read from conflict feed
433435

434-
These samples show how to read from a container's conflict feed. Conflicts show up in the conflict feed only if they weren't resolved automatically or if using a custom conflict policy.
436+
These samples show how to read from a container's conflict feed. Conflicts may show up in the conflict feed only for a couple of reasons:
437+
438+
- The conflict was not resolved automatically
439+
- The conflict caused an error with the designated stored procedure
440+
- The conflict resolution policy is set to **custom** and does not designate a stored procedure to handle conflicts
435441

436442
### <a id="read-from-conflict-feed-dotnet"></a>.NET SDK
437443

0 commit comments

Comments
 (0)