From 9302236810ec2266aaf76e91f0e5208a539155d7 Mon Sep 17 00:00:00 2001 From: Pierlauro Sciarelli Date: Mon, 5 Jul 2021 12:18:58 +0000 Subject: SERVER-58267 Fix shardVersionRetry usages in v4.4 (partial cherry-pick of SERVER-47530) --- src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp | 2 +- src/mongo/db/pipeline/sharded_agg_helpers.cpp | 2 +- 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 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 { // 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 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()); }); -- cgit v1.2.1