summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2021-07-05 12:18:58 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-06 08:24:16 +0000
commit9302236810ec2266aaf76e91f0e5208a539155d7 (patch)
treedce2d288906d7652e623de9f73e14bae1d979632
parent058cf0c5b2a087256486373e2d9d3715afe54baf (diff)
downloadmongo-9302236810ec2266aaf76e91f0e5208a539155d7.tar.gz
SERVER-58267 Fix shardVersionRetry usages in v4.4 (partial cherry-pick of SERVER-47530)
-rw-r--r--src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp2
-rw-r--r--src/mongo/db/pipeline/sharded_agg_helpers.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp b/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
index 473ab1e604e..a9fd76aabb3 100644
--- a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
+++ b/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
@@ -155,7 +155,7 @@ boost::optional<Document> MongosProcessInterface::lookupSingleDocument(
auto shardResults = sharded_agg_helpers::shardVersionRetry(
expCtx->opCtx,
catalogCache,
- expCtx->ns,
+ foreignExpCtx->ns,
str::stream() << "Looking up document matching " << redact(filter.toBson()),
[&]() -> std::vector<RemoteCursor> {
// Verify that the collection exists, with the correct UUID.
diff --git a/src/mongo/db/pipeline/sharded_agg_helpers.cpp b/src/mongo/db/pipeline/sharded_agg_helpers.cpp
index 65a862b20ce..f4b0b5fb689 100644
--- a/src/mongo/db/pipeline/sharded_agg_helpers.cpp
+++ b/src/mongo/db/pipeline/sharded_agg_helpers.cpp
@@ -1157,7 +1157,7 @@ std::unique_ptr<Pipeline, PipelineDeleter> attachCursorToPipeline(Pipeline* owne
// If the db is local, this may be a change stream examining the oplog. We know the
// oplog (and any other local collections) will not be sharded.
return expCtx->mongoProcessInterface->attachCursorSourceToPipelineForLocalRead(
- pipeline.release());
+ pipelineToTarget.release());
}
return targetShardsAndAddMergeCursors(expCtx, pipelineToTarget.release());
});