Google News
logo
MongoDB - Interview Questions
How does MongoDB handle transactions and locks?
MongoDB uses multi-granularity locking where in operations can be locked at the global, database or collection level. It is up to the storage engines to implement the level of concurrency. For example, in WiredTiger, it is at document-level. For reads, there is a shared locking mode, while for write there is an exclusive locking mode.
Advertisement