summaryrefslogtreecommitdiff
path: root/src/mongo/db/repair_database_and_check_version.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repair_database_and_check_version.cpp')
-rw-r--r--src/mongo/db/repair_database_and_check_version.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/repair_database_and_check_version.cpp b/src/mongo/db/repair_database_and_check_version.cpp
index 90f5872adc6..7a9a50e215e 100644
--- a/src/mongo/db/repair_database_and_check_version.cpp
+++ b/src/mongo/db/repair_database_and_check_version.cpp
@@ -78,11 +78,11 @@ Status restoreMissingFeatureCompatibilityVersionDocument(OperationContext* opCtx
// If the admin database, which contains the server configuration collection with the
// featureCompatibilityVersion document, does not exist, create it.
- Database* db = dbHolder().get(opCtx, fcvNss.db());
+ Database* db = DatabaseHolder::getDatabaseHolder().get(opCtx, fcvNss.db());
if (!db) {
log() << "Re-creating admin database that was dropped.";
}
- db = dbHolder().openDb(opCtx, fcvNss.db());
+ db = DatabaseHolder::getDatabaseHolder().openDb(opCtx, fcvNss.db());
invariant(db);
// If the server configuration collection, which contains the FCV document, does not exist, then
@@ -138,7 +138,7 @@ Status ensureAllCollectionsHaveUUIDs(OperationContext* opCtx,
bool isMmapV1 = opCtx->getServiceContext()->getGlobalStorageEngine()->isMmapV1();
std::vector<NamespaceString> nonReplicatedCollNSSsWithoutUUIDs;
for (const auto& dbName : dbNames) {
- Database* db = dbHolder().openDb(opCtx, dbName);
+ Database* db = DatabaseHolder::getDatabaseHolder().openDb(opCtx, dbName);
invariant(db);
for (auto collectionIt = db->begin(); collectionIt != db->end(); ++collectionIt) {
Collection* coll = *collectionIt;
@@ -346,7 +346,7 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) {
// Attempt to restore the featureCompatibilityVersion document if it is missing.
NamespaceString fcvNSS(NamespaceString::kServerConfigurationNamespace);
- Database* db = dbHolder().get(opCtx, fcvNSS.db());
+ Database* db = DatabaseHolder::getDatabaseHolder().get(opCtx, fcvNSS.db());
Collection* versionColl;
BSONObj featureCompatibilityVersion;
if (!db || !(versionColl = db->getCollection(opCtx, fcvNSS)) ||
@@ -377,7 +377,7 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) {
// it is fine to not open the "local" database and populate the catalog entries because we
// won't attempt to drop the temporary collections anyway.
Lock::DBLock dbLock(opCtx, kSystemReplSetCollection.db(), MODE_X);
- dbHolder().openDb(opCtx, kSystemReplSetCollection.db());
+ DatabaseHolder::getDatabaseHolder().openDb(opCtx, kSystemReplSetCollection.db());
}
const repl::ReplSettings& replSettings =
@@ -405,7 +405,7 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) {
}
LOG(1) << " Recovering database: " << dbName;
- Database* db = dbHolder().openDb(opCtx, dbName);
+ Database* db = DatabaseHolder::getDatabaseHolder().openDb(opCtx, dbName);
invariant(db);
// First thing after opening the database is to check for file compatibility,