summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/mr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/mr.cpp')
-rw-r--r--src/mongo/db/commands/mr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp
index 476fd6b5d3e..c743a951ba5 100644
--- a/src/mongo/db/commands/mr.cpp
+++ b/src/mongo/db/commands/mr.cpp
@@ -393,7 +393,8 @@ void State::dropTempCollections() {
writeConflictRetry(_opCtx, "M/R dropTempCollections", _config.incLong.ns(), [this] {
Lock::DBLock lk(_opCtx, _config.incLong.db(), MODE_X);
- if (Database* db = dbHolder().get(_opCtx, _config.incLong.ns())) {
+ if (Database* db =
+ DatabaseHolder::getDatabaseHolder().get(_opCtx, _config.incLong.ns())) {
WriteUnitOfWork wunit(_opCtx);
uassertStatusOK(db->dropCollection(_opCtx, _config.incLong.ns()));
wunit.commit();
@@ -653,7 +654,7 @@ unsigned long long _collectionCount(OperationContext* opCtx,
// If the global write lock is held, we must avoid using AutoGetCollectionForReadCommand as it
// may lead to deadlock when waiting for a majority snapshot to be committed. See SERVER-24596.
if (callerHoldsGlobalLock) {
- Database* db = dbHolder().get(opCtx, nss.ns());
+ Database* db = DatabaseHolder::getDatabaseHolder().get(opCtx, nss.ns());
if (db) {
coll = db->getCollection(opCtx, nss);
}