summaryrefslogtreecommitdiff
path: root/src/mongo/db/repair_database.cpp
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2019-04-25 14:54:48 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2019-04-25 15:11:04 -0400
commit3a8c33cd95abaa7455b2c01726bdbf413cc938e5 (patch)
tree568bf26f33eaea6c5f6ccf87c2d58b438cd5fc0e /src/mongo/db/repair_database.cpp
parentaa4903255505f9072581e8ea4c63b93093f04508 (diff)
downloadmongo-3a8c33cd95abaa7455b2c01726bdbf413cc938e5.tar.gz
SERVER-39520 Use database IX lock for dropCollection
Diffstat (limited to 'src/mongo/db/repair_database.cpp')
-rw-r--r--src/mongo/db/repair_database.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/repair_database.cpp b/src/mongo/db/repair_database.cpp
index 4d690411b1b..635d9e7a2bb 100644
--- a/src/mongo/db/repair_database.cpp
+++ b/src/mongo/db/repair_database.cpp
@@ -142,7 +142,7 @@ Status repairCollections(OperationContext* opCtx,
const std::string& dbName,
stdx::function<void(const std::string& dbName)> onRecordStoreRepair) {
- auto colls = UUIDCatalog::get(opCtx).getAllCollectionNamesFromDb(dbName);
+ auto colls = UUIDCatalog::get(opCtx).getAllCollectionNamesFromDb(opCtx, dbName);
for (const auto& nss : colls) {
opCtx->checkForInterrupt();
@@ -183,7 +183,7 @@ Status repairDatabase(OperationContext* opCtx,
DisableDocumentValidation validationDisabler(opCtx);
// We must hold some form of lock here
- invariant(opCtx->lockState()->isLocked());
+ invariant(opCtx->lockState()->isW());
invariant(dbName.find('.') == std::string::npos);
log() << "repairDatabase " << dbName;