summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2020-09-09 21:32:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-15 00:42:05 +0000
commit58828b0ce9556ee9cb38c484d1226663a0dcd993 (patch)
treedfea448799d9bd4328114199a9767dd18d045be3 /src/mongo/db/curop.cpp
parent22a77301a5b63b9bb7ef6dd73eabb4865c63a921 (diff)
downloadmongo-58828b0ce9556ee9cb38c484d1226663a0dcd993.tar.gz
SERVER-43909 clarify and repair util/hex.h API
- hexblob namespace - Throwy hexblob::decode (nee fromHex) - StringData overloads of hex codec ops - add unsignedHex<T> and zeroPaddedHex<T>
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 26d598c6b08..d0671be2d00 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -333,7 +333,7 @@ void CurOp::reportCurrentOpForClient(OperationContext* opCtx,
/** This branch becomes useful again with SERVER-44091
for (const auto& frame : diagnostic->makeStackTrace().frames) {
BSONObjBuilder backtraceObj(backtraceBuilder.subobjStart());
- backtraceObj.append("addr", integerToHex(frame.instructionOffset));
+ backtraceObj.append("addr", unsignedHex(frame.instructionOffset));
backtraceObj.append("path", frame.objectPath);
}
*/
@@ -860,9 +860,9 @@ string OpDebug::report(OperationContext* opCtx, const SingleThreadedLockStats* l
OPDEBUG_TOSTRING_HELP(nreturned);
if (queryHash) {
- s << " queryHash:" << unsignedIntToFixedLengthHex(*queryHash);
+ s << " queryHash:" << zeroPaddedHex(*queryHash);
invariant(planCacheKey);
- s << " planCacheKey:" << unsignedIntToFixedLengthHex(*planCacheKey);
+ s << " planCacheKey:" << zeroPaddedHex(*planCacheKey);
}
if (!errInfo.isOK()) {
@@ -1029,9 +1029,9 @@ void OpDebug::report(OperationContext* opCtx,
OPDEBUG_TOATTR_HELP(nreturned);
if (queryHash) {
- pAttrs->addDeepCopy("queryHash", unsignedIntToFixedLengthHex(*queryHash));
+ pAttrs->addDeepCopy("queryHash", zeroPaddedHex(*queryHash));
invariant(planCacheKey);
- pAttrs->addDeepCopy("planCacheKey", unsignedIntToFixedLengthHex(*planCacheKey));
+ pAttrs->addDeepCopy("planCacheKey", zeroPaddedHex(*planCacheKey));
}
if (!errInfo.isOK()) {
@@ -1156,9 +1156,9 @@ void OpDebug::append(OperationContext* opCtx,
OPDEBUG_APPEND_NUMBER(b, nreturned);
if (queryHash) {
- b.append("queryHash", unsignedIntToFixedLengthHex(*queryHash));
+ b.append("queryHash", zeroPaddedHex(*queryHash));
invariant(planCacheKey);
- b.append("planCacheKey", unsignedIntToFixedLengthHex(*planCacheKey));
+ b.append("planCacheKey", zeroPaddedHex(*planCacheKey));
}
{
@@ -1409,12 +1409,12 @@ std::function<BSONObj(ProfileFilter::Args)> OpDebug::appendStaged(StringSet requ
addIfNeeded("queryHash", [](auto field, auto args, auto& b) {
if (args.op.queryHash) {
- b.append(field, unsignedIntToFixedLengthHex(*args.op.queryHash));
+ b.append(field, zeroPaddedHex(*args.op.queryHash));
}
});
addIfNeeded("planCacheKey", [](auto field, auto args, auto& b) {
if (args.op.planCacheKey) {
- b.append(field, unsignedIntToFixedLengthHex(*args.op.planCacheKey));
+ b.append(field, zeroPaddedHex(*args.op.planCacheKey));
}
});