diff options
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r-- | src/mongo/db/ops/write_ops_exec.cpp | 7 |
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); |