From f373d5198d1385bcdb637d045bb92793087e20ef Mon Sep 17 00:00:00 2001 From: "Tim Slavin (MongoDB)" Date: Wed, 20 Aug 2014 10:57:38 -0400 Subject: [PATCH] DOCS-3838: unclear locking behavior when repairing a database --- source/faq/concurrency.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/faq/concurrency.txt b/source/faq/concurrency.txt index fe4396d96c3..34ff8249bae 100644 --- a/source/faq/concurrency.txt +++ b/source/faq/concurrency.txt @@ -49,8 +49,9 @@ typically short lived operations involving multiple databases, still require a global "instance" wide lock. Before 2.2, there is only one "global" lock per :program:`mongod` instance. -For example, if you have six databases and one takes a write lock, the -other five are still available for read and write. +For example, if you have six databases and one takes a database-level +write lock, the other five are still available for read and write. A +global lock makes all six databases unavailable during the operation. How do I see the status of locks on my :program:`mongod` instances? ------------------------------------------------------------------- @@ -159,6 +160,9 @@ The following MongoDB operations lock multiple databases: - :method:`db.copyDatabase()` must lock the entire :program:`mongod` instance at once. +- :method:`db.repairDatabase()` obtains a global write lock and will block + other operations until it completes. + - :term:`Journaling `, which is an internal operation, locks all databases for short intervals. All databases share a single journal.