summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_cursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source_cursor.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_cursor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp
index 184659a45bc..f5bc8dd7395 100644
--- a/src/mongo/db/pipeline/document_source_cursor.cpp
+++ b/src/mongo/db/pipeline/document_source_cursor.cpp
@@ -137,12 +137,15 @@ void DocumentSourceCursor::loadBatch() {
PlanExecutor::ExecState state;
Document resultObj;
- // TODO SERVER-62798: Replace this with 'AutoGetCollectionMulti'.
boost::optional<AutoGetCollectionForReadMaybeLockFree> autoColl;
tassert(5565800,
"Expected PlanExecutor to use an external lock policy",
_exec->lockPolicy() == PlanExecutor::LockPolicy::kLockExternally);
- autoColl.emplace(pExpCtx->opCtx, _exec->nss());
+ autoColl.emplace(pExpCtx->opCtx,
+ _exec->nss(),
+ AutoGetCollectionViewMode::kViewsForbidden,
+ Date_t::max(),
+ _exec->getSecondaryNamespaces());
uassertStatusOK(repl::ReplicationCoordinator::get(pExpCtx->opCtx)
->checkCanServeReadsFor(pExpCtx->opCtx, _exec->nss(), true));