summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_find.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/query/cluster_find.cpp')
-rw-r--r--src/mongo/s/query/cluster_find.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/s/query/cluster_find.cpp b/src/mongo/s/query/cluster_find.cpp
index 7ed9694090c..cca6cf1ee02 100644
--- a/src/mongo/s/query/cluster_find.cpp
+++ b/src/mongo/s/query/cluster_find.cpp
@@ -466,8 +466,10 @@ Status setUpOperationContextStateForGetMore(OperationContext* opCtx,
// that if the 'getMore' command itself has a 'comment' field, we give precedence to it.
auto comment = cursor->getOriginatingCommand()["comment"];
if (!opCtx->getComment() && comment) {
+ stdx::lock_guard<Client> lk(*opCtx->getClient());
opCtx->setComment(comment.wrap());
}
+
if (cursor->isTailableAndAwaitData()) {
// For tailable + awaitData cursors, the request may have indicated a maximum amount of time
// to wait for new data. If not, default it to 1 second. We track the deadline instead via