diff options
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.cpp')
| -rw-r--r-- | src/mongo/db/pipeline/pipeline_d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp index 0661430956f..9523261eb8a 100644 --- a/src/mongo/db/pipeline/pipeline_d.cpp +++ b/src/mongo/db/pipeline/pipeline_d.cpp @@ -157,7 +157,7 @@ StatusWith<unique_ptr<PlanExecutor, PlanExecutor::Deleter>> createRandomCursorEx if (ShardingState::get(opCtx)->needCollectionMetadata(opCtx, collection->ns().ns())) { auto shardFilterStage = stdx::make_unique<ShardFilterStage>( opCtx, - CollectionShardingState::get(opCtx, collection->ns())->getMetadata(opCtx), + CollectionShardingState::get(opCtx, collection->ns())->getMetadataForOperation(opCtx), ws.get(), stage.release()); return PlanExecutor::make(opCtx, @@ -610,7 +610,7 @@ DBClientBase* PipelineD::MongoDInterface::directClient() { bool PipelineD::MongoDInterface::isSharded(OperationContext* opCtx, const NamespaceString& nss) { AutoGetCollectionForReadCommand autoColl(opCtx, nss); auto const css = CollectionShardingState::get(opCtx, nss); - return css->getMetadata(opCtx)->isSharded(); + return css->getCurrentMetadata()->isSharded(); } BSONObj PipelineD::MongoDInterface::insert(const boost::intrusive_ptr<ExpressionContext>& expCtx, @@ -752,7 +752,7 @@ Status PipelineD::MongoDInterface::attachCursorSourceToPipeline( auto css = CollectionShardingState::get(expCtx->opCtx, expCtx->ns); uassert(4567, str::stream() << "from collection (" << expCtx->ns.ns() << ") cannot be sharded", - !css->getMetadata(expCtx->opCtx)->isSharded()); + !css->getCurrentMetadata()->isSharded()); PipelineD::prepareCursorSource(autoColl->getCollection(), expCtx->ns, nullptr, pipeline); @@ -800,7 +800,7 @@ std::pair<std::vector<FieldPath>, bool> PipelineD::MongoDInterface::collectDocum auto scm = [opCtx, &nss]() -> ScopedCollectionMetadata { AutoGetCollection autoColl(opCtx, nss, MODE_IS); - return CollectionShardingState::get(opCtx, nss)->getMetadata(opCtx); + return CollectionShardingState::get(opCtx, nss)->getCurrentMetadata(); }(); // Collection is not sharded or UUID mismatch implies collection has been dropped and recreated |
