Mongo - Custom pessimistic locking mechanism

Problem:

Having one thread updating a document at a time.

Solution:

Lock manager:


, lock implementation:


, how to:
1) check if the document is locked
2) acquire the lock
3) release the lock


Comments

Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

spring @async causing BeanCurrentlyInCreationException