ConflictResolutionPolicy interface
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.
Properties
conflict |
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 LastWriterWins.
|
conflict |
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.
|
mode | Gets or sets the in the Azure Cosmos DB service. By default it is LastWriterWins. |
Property Details
conflictResolutionPath
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 LastWriterWins.
conflictResolutionPolicy.ConflictResolutionPath = "/name/first";
conflictResolutionPath?: string
Property Value
string
conflictResolutionProcedure
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.
- This value should only be set when using Custom.
- 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"
conflictResolutionProcedure?: string
Property Value
string
mode
Gets or sets the in the Azure Cosmos DB service. By default it is LastWriterWins.
mode?: "Custom" | "LastWriterWins"
Property Value
"Custom" | "LastWriterWins"