Lock on mongoDB

2

Well guys, I'm using mongodb to develop projects in college, I'd like to know (documentation is weak on Mongo's website link ) how does the lock work on it, with breakdown, if it's locking the whole bank in the collection.

    
asked by anonymous 05.03.2016 / 03:24

1 answer

1

It only locks the document in a collection that is being written or edited. When there are many read / write operations, this operation takes place in memory, and the "read" can be done even before the actual write to the database. If the mongod fails, the data does not persist. Mongo has commit intervals, which record the data from "ram" to "disk" from time to time.

    
05.03.2016 / 04:07