diff options
Diffstat (limited to 'src/mongo/db/commands/explain_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/explain_cmd.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/commands/explain_cmd.cpp b/src/mongo/db/commands/explain_cmd.cpp index 318029aef75..34f3965d454 100644 --- a/src/mongo/db/commands/explain_cmd.cpp +++ b/src/mongo/db/commands/explain_cmd.cpp @@ -165,6 +165,7 @@ std::unique_ptr<CommandInvocation> CmdExplain::parse(OperationContext* opCtx, // Extract 'comment' field from the 'explainedObj' only if there is no top-level comment. auto commentField = explainedObj["comment"]; if (!opCtx->getComment() && commentField) { + stdx::lock_guard<Client> lk(*opCtx->getClient()); opCtx->setComment(commentField.wrap()); } |