summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorMickey. J Winters <mickey.winters@mongodb.com>2021-08-19 17:41:16 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-19 18:45:26 +0000
commit093eeacde2f5a2c84dbf9ac22ea851ac4471e3e4 (patch)
treeba77915687904da96281a95510d7b452eec778d4 /src/mongo/db/clientcursor.cpp
parent5a670b3d9ecdf085e727e29fb1ad9c939cf0838a (diff)
downloadmongo-093eeacde2f5a2c84dbf9ac22ea851ac4471e3e4.tar.gz
SERVER-54571 Add queryHash and planCacheKey fields to getMore request slow query logs
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 937034d1df8..34bf5756963 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -46,6 +46,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/commands/server_status.h"
#include "mongo/db/commands/server_status_metric.h"
+#include "mongo/db/curop.h"
#include "mongo/db/cursor_manager.h"
#include "mongo/db/cursor_server_params.h"
#include "mongo/db/jsobj.h"
@@ -100,6 +101,8 @@ ClientCursor::ClientCursor(ClientCursorParams params,
_lastUseDate(now),
_createdDate(now),
_planSummary(_exec->getPlanExplainer().getPlanSummary()),
+ _planCacheKey(CurOp::get(operationUsingCursor)->debug().planCacheKey),
+ _queryHash(CurOp::get(operationUsingCursor)->debug().queryHash),
_opKey(operationUsingCursor->getOperationKey()) {
invariant(_exec);
invariant(_operationUsingCursor);