Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ConflictResolutionPolicy

Represents the conflict resolution policy configuration for specifying how to resolve conflicts in case writes from different regions result in conflicts on documents in the collection in the Azure Cosmos DB service.

Hierarchy

  • ConflictResolutionPolicy

Index

Properties

Optional conflictResolutionPath

conflictResolutionPath: string

Gets or sets the path which is present in each document in the Azure Cosmos DB service for last writer wins conflict-resolution. This path must be present in each document and must be an integer value. In case of a conflict occurring on a document, the document with the higher integer value in the specified path will be picked. If the path is unspecified, by default the timestamp path will be used.

This value should only be set when using ConflictResolutionMode.LastWriterWins.

conflictResolutionPolicy.ConflictResolutionPath = "/name/first";

Optional conflictResolutionProcedure

conflictResolutionProcedure: string

Gets or sets the StoredProcedure which is used for conflict resolution in the Azure Cosmos DB service. This stored procedure may be created after the Container is created and can be changed as required.

  1. This value should only be set when using ConflictResolutionMode.Custom.
  2. In case the stored procedure fails or throws an exception, the conflict resolution will default to registering conflicts in the conflicts feed.
conflictResolutionPolicy.ConflictResolutionProcedure = "resolveConflict"

Optional mode

mode: keyof ConflictResolutionMode

Gets or sets the in the Azure Cosmos DB service. By default it is ConflictResolutionMode.LastWriterWins.

Generated using TypeDoc