diff options
author | Mihai Andrei <mihai.andrei@10gen.com> | 2022-03-01 20:52:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-01 22:13:51 +0000 |
commit | 7283309a1745451a593ac349cc8a70b6657df77d (patch) | |
tree | 88d8a6a6b8820a26b8980b87d622df73ed1d388a /src/mongo/db/pipeline/document_source_cursor.cpp | |
parent | dcb787226cdd575ea1c7c95ad6a0b996b3c8b27a (diff) | |
download | mongo-7283309a1745451a593ac349cc8a70b6657df77d.tar.gz |
SERVER-62798 Use single 'AutoGet' for all execution namespaces instead of multiple in 'runAggregate'
Diffstat (limited to 'src/mongo/db/pipeline/document_source_cursor.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_cursor.cpp | 7 |
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)); |