summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@mongodb.com>2020-05-11 15:55:58 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-14 22:17:25 +0000
commitaebf6a5d01a28c7d5a3a4ee68d11c2e150291131 (patch)
treed9245faa82d7a1482b1b1c978b757d7eaeb38571 /src/mongo/db/ops
parent9d8eb69d583b89682520ec58595e558d5f6cc9a2 (diff)
downloadmongo-aebf6a5d01a28c7d5a3a4ee68d11c2e150291131.tar.gz
SERVER-47803 Move the database level profile setting from Database into CollectionCatalog
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/write_ops_exec.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp
index 061658ca4a1..ce348f9c144 100644
--- a/src/mongo/db/ops/write_ops_exec.cpp
+++ b/src/mongo/db/ops/write_ops_exec.cpp
@@ -396,7 +396,8 @@ bool insertBatchAndHandleErrors(OperationContext* opCtx,
makeCollection(opCtx, wholeOp.getNamespace());
}
- curOp.raiseDbProfileLevel(collection->getDb()->getProfilingLevel());
+ curOp.raiseDbProfileLevel(
+ CollectionCatalog::get(opCtx).getDatabaseProfileLevel(wholeOp.getNamespace().db()));
assertCanWrite_inlock(opCtx, wholeOp.getNamespace());
CurOpFailpointHelpers::waitWhileFailPointEnabled(
@@ -661,7 +662,7 @@ static SingleWriteResult performSingleUpdateOp(OperationContext* opCtx,
auto& curOp = *CurOp::get(opCtx);
if (collection->getDb()) {
- curOp.raiseDbProfileLevel(collection->getDb()->getProfilingLevel());
+ curOp.raiseDbProfileLevel(CollectionCatalog::get(opCtx).getDatabaseProfileLevel(ns.db()));
}
assertCanWrite_inlock(opCtx, ns);
@@ -896,7 +897,7 @@ static SingleWriteResult performSingleDeleteOp(OperationContext* opCtx,
AutoGetCollection collection(opCtx, ns, fixLockModeForSystemDotViewsChanges(ns, MODE_IX));
if (collection.getDb()) {
- curOp.raiseDbProfileLevel(collection.getDb()->getProfilingLevel());
+ curOp.raiseDbProfileLevel(CollectionCatalog::get(opCtx).getDatabaseProfileLevel(ns.db()));
}
assertCanWrite_inlock(opCtx, ns);