summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/group.cpp')
-rw-r--r--src/mongo/db/exec/group.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mongo/db/exec/group.cpp b/src/mongo/db/exec/group.cpp
index 891fc232796..2c0ea523a2f 100644
--- a/src/mongo/db/exec/group.cpp
+++ b/src/mongo/db/exec/group.cpp
@@ -77,8 +77,7 @@ GroupStage::GroupStage(OperationContext* txn,
const GroupRequest& request,
WorkingSet* workingSet,
PlanStage* child)
- : PlanStage(kStageType),
- _txn(txn),
+ : PlanStage(kStageType, txn),
_request(request),
_ws(workingSet),
_specificStats(),
@@ -94,7 +93,8 @@ void GroupStage::initGroupScripting() {
AuthorizationSession::get(ClientBasic::getCurrent())->getAuthenticatedUserNamesToken();
const NamespaceString nss(_request.ns);
- _scope = globalScriptEngine->getPooledScope(_txn, nss.db().toString(), "group" + userToken);
+ _scope =
+ globalScriptEngine->getPooledScope(getOpCtx(), nss.db().toString(), "group" + userToken);
if (!_request.reduceScope.isEmpty()) {
_scope->init(&_request.reduceScope);
}
@@ -257,10 +257,6 @@ bool GroupStage::isEOF() {
return _groupState == GroupState_Done;
}
-void GroupStage::doReattachToOperationContext(OperationContext* opCtx) {
- _txn = opCtx;
-}
-
unique_ptr<PlanStageStats> GroupStage::getStats() {
_commonStats.isEOF = isEOF();
unique_ptr<PlanStageStats> ret = make_unique<PlanStageStats>(_commonStats, STAGE_GROUP);