yozepi
yozepi

Reputation: 372

Does Cosmos block a partition while executing a stored procedure?

I'm writing a sproc that increments a value in a "meta" document for every document the sproc inserts. This will only work if the partition is locked while the sproc executes. Does cosmos lock the partition for writes by other callers or are concurrent writes in the partition allowed while the sproc executes?

Thanks in advance for your help.

Upvotes: 0

Views: 345

Answers (1)

Mark Brown
Mark Brown

Reputation: 8763

Cosmos DB has optimistic locking and uses etags for concurrency.

More details can be found at Optimistic Concurrency Control

Hope this helps.

Upvotes: 1

Related Questions