summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_aggregation_planner.cpp
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2020-06-15 13:52:06 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-15 21:17:51 +0000
commit1261db4a593fe06c5139fc0c9877c406d76b5bb4 (patch)
treec01de597d19ddc99496c8c5557ca04e9ae4d8cf3 /src/mongo/s/query/cluster_aggregation_planner.cpp
parent97631cdd42360d4a2d07941ae989a0047707914e (diff)
downloadmongo-1261db4a593fe06c5139fc0c9877c406d76b5bb4.tar.gz
SERVER-48557: Omit cursor.atClusterTime field from read replies in transactions
Diffstat (limited to 'src/mongo/s/query/cluster_aggregation_planner.cpp')
-rw-r--r--src/mongo/s/query/cluster_aggregation_planner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/s/query/cluster_aggregation_planner.cpp b/src/mongo/s/query/cluster_aggregation_planner.cpp
index 5b7ea00286f..79aff1295c6 100644
--- a/src/mongo/s/query/cluster_aggregation_planner.cpp
+++ b/src/mongo/s/query/cluster_aggregation_planner.cpp
@@ -269,7 +269,9 @@ BSONObj establishMergingMongosCursor(OperationContext* opCtx,
rpc::OpMsgReplyBuilder replyBuilder;
CursorResponseBuilder::Options options;
options.isInitialResponse = true;
- options.atClusterTime = repl::ReadConcernArgs::get(opCtx).getArgsAtClusterTime();
+ if (!opCtx->inMultiDocumentTransaction()) {
+ options.atClusterTime = repl::ReadConcernArgs::get(opCtx).getArgsAtClusterTime();
+ }
CursorResponseBuilder responseBuilder(&replyBuilder, options);
bool stashedResult = false;