MongoDB Documentation, Release 3.0.4 760 Chapter 11. Frequently Asked Questions Operation Lock Type Issue a query Read lock Get more data from a cursor Read lock Insert data Write lock Remove data Write lock Update data Write lock Map-reduce Read lock and write lock, unless operations are specified as non-atomic. Portions of map-reduce jobs can run concurrently. Create an index Building an index in the foreground, which is the default, locks the database for extended periods of time. db.eval() Deprecated since version 3.0. Write lock. The db.eval() method takes a global write lock while evaluating the JavaScript function. To avoid taking this global write lock, you can use the eval command with nolock: true . eval Deprecated since version 3.0. Write lock. By default, eval command takes a global write lock while evaluating the JavaScript function. If used with nolock: true , the eval command does not take a global write lock while evaluating the JavaScript function. However, the logic within the JavaScript function may take write locks for write operations. aggregate() Read lock Certain administrative commands can exclusively lock the database for extended periods of time. In some deploy- ments, for large databases, you may consider taking the mongod instance offline so that clients are not affected. For example, if a mongod is part of a replica set , take the mongod offline and let other members of the set service load while maintenance is in progress. The following administrative operations require an exclusive (i.e. write) lock on the database for extended periods: The following administrative commands lock the database but only hold the lock for a very short time: • db.collection.createIndex() , when issued without setting background to true , • reIndex , • compact , • db.repairDatabase() , • db.createCollection() , when creating a very large (i.e. many gigabytes) capped collection, • db.collection.validate() , and • db.copyDatabase() . This operation may lock all databases. See Does a MongoDB operation ever lock more than one database? (page 761). • db.collection.dropIndex() , • db.getLastError() , • db.isMaster() , • rs.status() (i.e. replSetGetStatus ), • db.serverStatus() , • db.auth() , and • db.addUser() . 11.4.6 Which administrative commands lock the database?