nerdexam
Microsoft

DP-420 · Question #17

You have an Azure Cosmos DB for NoSQL account that uses a custom conflict resolution policy. The account has a registered merge procedure that throws a runtime exception. The runtime exception…

The correct answer is A. a function that pulls items from the conflicts feed and is triggered by a timer trigger. When the registered merge procedure throws a runtime exception, Azure Cosmos DB cannot resolve conflicts automatically. Unresolved conflicts are written to the conflicts feed, which is a special system feed separate from the change feed. To resolve these conflicts with an Azure…

Integrate an Azure Cosmos DB solution

Question

You have an Azure Cosmos DB for NoSQL account that uses a custom conflict resolution policy. The account has a registered merge procedure that throws a runtime exception. The runtime exception prevents conflicts from being resolved. You need to use an Azure function to resolve the conflicts. What should you use?

Options

  • Aa function that pulls items from the conflicts feed and is triggered by a timer trigger
  • Ba function that receives items pushed from the change feed and is triggered by an Azure Cosmos
  • Ca function that pulls items from the change feed and is triggered by a timer trigger
  • Da function that receives items pushed from the conflicts feed and is triggered by an Azure

How the community answered

(35 responses)
  • A
    83% (29)
  • B
    3% (1)
  • C
    3% (1)
  • D
    11% (4)

Explanation

When the registered merge procedure throws a runtime exception, Azure Cosmos DB cannot resolve conflicts automatically. Unresolved conflicts are written to the conflicts feed, which is a special system feed separate from the change feed. To resolve these conflicts with an Azure Function, the function must pull items from the conflicts feed - not the change feed, which only contains committed document mutations. A timer trigger is appropriate because the conflicts feed is a pull-based feed (unlike the change feed, which has push-based trigger support). Options B and C incorrectly reference the change feed, which does not contain conflict records. Option D references the conflicts feed correctly but incorrectly describes it as push-based; the conflicts feed must be polled.

Topics

#Cosmos DB Conflicts#Azure Functions#Conflict Resolution#Timer Trigger

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice