diff options
author | Mickey. J Winters <mickey.winters@mongodb.com> | 2021-07-07 15:18:31 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-07 15:43:04 +0000 |
commit | a862b5d0279bb681634f698def16b90c1117b3f5 (patch) | |
tree | 12a9ac60b7ca84f1be01cf85c895060e795d1abe /src/mongo/db/curop.cpp | |
parent | 2a41fb45f89a9b7b51053f9b448d767ba074684e (diff) | |
download | mongo-a862b5d0279bb681634f698def16b90c1117b3f5.tar.gz |
SERVER-53859 Add queryHash to the mongos slow query logs
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 72454cd9420..75e0684aaf9 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -917,7 +917,8 @@ string OpDebug::report(OperationContext* opCtx, const SingleThreadedLockStats* l if (queryHash) { s << " queryHash:" << zeroPaddedHex(*queryHash); - invariant(planCacheKey); + } + if (planCacheKey) { s << " planCacheKey:" << zeroPaddedHex(*planCacheKey); } @@ -1100,7 +1101,8 @@ void OpDebug::report(OperationContext* opCtx, if (queryHash) { pAttrs->addDeepCopy("queryHash", zeroPaddedHex(*queryHash)); - invariant(planCacheKey); + } + if (planCacheKey) { pAttrs->addDeepCopy("planCacheKey", zeroPaddedHex(*planCacheKey)); } @@ -1249,7 +1251,8 @@ void OpDebug::append(OperationContext* opCtx, if (queryHash) { b.append("queryHash", zeroPaddedHex(*queryHash)); - invariant(planCacheKey); + } + if (planCacheKey) { b.append("planCacheKey", zeroPaddedHex(*planCacheKey)); } |