azure-cosmos-dotnet-repository
azure-cosmos-dotnet-repository copied to clipboard
Distributed Locking (Lease Lock)
Is your feature request related to a problem? Please describe.
It would be really great if the library could offer an opt-int repository that would allow a document to be inserted that could act as a lock maybe into something called a lease
container. The library could abstract a nice and simple API over this.
Describe the solution you'd like Something that allows a distributed lock to be used with cosmos DB, with little effort from the user's side.
Describe alternatives you've considered Implementing this standalone, or maybe as a separate package.
Additional context There is some information on these here
- https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
- https://medium.com/@fbeltrao/distributed-locking-in-azure-functions-bc4517c0306c
-
Etag
a will need to be used in order to do this effectively
Great idea, @mumby0168! We could use lease locks for sure.