Lock on the mongoDB

Asked

Viewed 312 times

2

Good guys, I am using mongodb to develop projects in college, I would like to know (documentation is weak on the site of Mongo https://docs.mongodb.org/manual/faq/concurrency/ ) how the lock works on it, with detailing, whether it lock on the whole bank, in the collection.

1 answer

1


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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.