Reputation: 372
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
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