diff options
Diffstat (limited to 'src/mongo/db/commands/parallel_collection_scan.cpp')
-rw-r--r-- | src/mongo/db/commands/parallel_collection_scan.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/commands/parallel_collection_scan.cpp b/src/mongo/db/commands/parallel_collection_scan.cpp index 41689016961..df783b46062 100644 --- a/src/mongo/db/commands/parallel_collection_scan.cpp +++ b/src/mongo/db/commands/parallel_collection_scan.cpp @@ -85,7 +85,7 @@ public: return Status(ErrorCodes::Unauthorized, "Unauthorized"); } - virtual bool run(OperationContext* txn, + virtual bool run(OperationContext* opCtx, const string& dbname, BSONObj& cmdObj, int options, @@ -93,7 +93,7 @@ public: BSONObjBuilder& result) { const NamespaceString ns(parseNsCollectionRequired(dbname, cmdObj)); - AutoGetCollectionForRead ctx(txn, ns); + AutoGetCollectionForRead ctx(opCtx, ns); Collection* collection = ctx.getCollection(); if (!collection) @@ -111,7 +111,7 @@ public: << " was: " << numCursors)); - auto iterators = collection->getManyCursors(txn); + auto iterators = collection->getManyCursors(opCtx); if (iterators.size() < numCursors) { numCursors = iterators.size(); } @@ -120,11 +120,11 @@ public: for (size_t i = 0; i < numCursors; i++) { unique_ptr<WorkingSet> ws = make_unique<WorkingSet>(); unique_ptr<MultiIteratorStage> mis = - make_unique<MultiIteratorStage>(txn, ws.get(), collection); + make_unique<MultiIteratorStage>(opCtx, ws.get(), collection); // Takes ownership of 'ws' and 'mis'. auto statusWithPlanExecutor = PlanExecutor::make( - txn, std::move(ws), std::move(mis), collection, PlanExecutor::YIELD_AUTO); + opCtx, std::move(ws), std::move(mis), collection, PlanExecutor::YIELD_AUTO); invariant(statusWithPlanExecutor.isOK()); execs.push_back(std::move(statusWithPlanExecutor.getValue())); } @@ -152,9 +152,9 @@ public: auto pinnedCursor = collection->getCursorManager()->registerCursor( {exec.release(), ns.ns(), - txn->recoveryUnit()->isReadingFromMajorityCommittedSnapshot()}); + opCtx->recoveryUnit()->isReadingFromMajorityCommittedSnapshot()}); pinnedCursor.getCursor()->setLeftoverMaxTimeMicros( - txn->getRemainingMaxTimeMicros()); + opCtx->getRemainingMaxTimeMicros()); BSONObjBuilder threadResult; appendCursorResponseObject( |