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

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"