summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_entry_point_common.cpp
diff options
context:
space:
mode:
authorPatrick Freed <patrick.freed@mongodb.com>2023-02-17 15:23:40 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-17 18:04:39 +0000
commitb221af175a73b66a640a92fb364b8cc1a759e5e3 (patch)
treee7cf414f83050f1caa476f2febde773ec92f87c4 /src/mongo/db/service_entry_point_common.cpp
parent6289f39abc73003ad1f7ac9f0ecfc038170b131c (diff)
downloadmongo-b221af175a73b66a640a92fb364b8cc1a759e5e3.tar.gz
SERVER-73307 Ensure CurOpStack always has access to its OperationContext (#10536)
This also ensures base lock stats are properly subtracted out when getting the lock stats for a given sub operation (fixes SERVER-73571).
Diffstat (limited to 'src/mongo/db/service_entry_point_common.cpp')
-rw-r--r--src/mongo/db/service_entry_point_common.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index f357cfc87bb..62d953e82e7 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -1539,7 +1539,7 @@ void ExecCommandDatabase::_initiateCommand() {
}
if (CommandHelpers::isHelpRequest(helpField)) {
- CurOp::get(opCtx)->ensureStarted(opCtx);
+ CurOp::get(opCtx)->ensureStarted();
// We disable not-primary-error tracker for help requests due to SERVER-11492, because
// config servers use help requests to determine which commands are database writes, and so
// must be forwarded to all config servers.
@@ -1743,7 +1743,7 @@ void ExecCommandDatabase::_initiateCommand() {
uassertStatusOK(status);
}
- CurOp::get(opCtx)->ensureStarted(opCtx);
+ CurOp::get(opCtx)->ensureStarted();
command->incrementCommandsExecuted();
@@ -2320,7 +2320,6 @@ void HandleRequest::completeOperation(DbResponse& response) {
// Mark the op as complete, and log it if appropriate. Returns a boolean indicating whether
// this op should be written to the profiler.
const bool shouldProfile = currentOp.completeAndLogOperation(
- opCtx,
MONGO_LOGV2_DEFAULT_COMPONENT,
CollectionCatalog::get(opCtx)
->getDatabaseProfileSettings(currentOp.getNSS().dbName())