summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
authorCraig Harris <craig.harris@10gen.com>2014-06-25 17:06:03 -0400
committerCraigHarris <craig.harris@10gen.com>2014-07-08 10:53:53 -0400
commit0450a0f25d4509f6515e939a5ef3a671f744cc2a (patch)
treebd5004de51df5ebe4923a6af0863ab5c4b10f8fc /src/mongo/db/pipeline
parentb1048dc6f42e184c08853fe98c21a90ecfb40d6b (diff)
downloadmongo-0450a0f25d4509f6515e939a5ef3a671f744cc2a.tar.gz
SERVER-14387 Propogate OperationContext through calls requiring document read locks, without doing the locking.
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/pipeline_d.cpp7
-rw-r--r--src/mongo/db/pipeline/pipeline_d.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp
index 6f62767f999..1f6f93f1274 100644
--- a/src/mongo/db/pipeline/pipeline_d.cpp
+++ b/src/mongo/db/pipeline/pipeline_d.cpp
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 10gen Inc.
+ * Copyright (c) 2012-2014 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
@@ -75,6 +75,7 @@ namespace {
}
boost::shared_ptr<Runner> PipelineD::prepareCursorSource(
+ OperationContext* txn,
Collection* collection,
const intrusive_ptr<Pipeline>& pPipeline,
const intrusive_ptr<ExpressionContext>& pExpCtx) {
@@ -178,7 +179,7 @@ namespace {
&cq,
whereCallback);
Runner* rawRunner;
- if (status.isOK() && getRunner(collection, cq, &rawRunner, runnerOptions).isOK()) {
+ if (status.isOK() && getRunner(txn, collection, cq, &rawRunner, runnerOptions).isOK()) {
// success: The Runner will handle sorting for us using an index.
runner.reset(rawRunner);
sortInRunner = true;
@@ -203,7 +204,7 @@ namespace {
whereCallback));
Runner* rawRunner;
- uassertStatusOK(getRunner(collection, cq, &rawRunner, runnerOptions));
+ uassertStatusOK(getRunner(txn, collection, cq, &rawRunner, runnerOptions));
runner.reset(rawRunner);
}
diff --git a/src/mongo/db/pipeline/pipeline_d.h b/src/mongo/db/pipeline/pipeline_d.h
index b6b34e6f378..b9d85a69dbb 100644
--- a/src/mongo/db/pipeline/pipeline_d.h
+++ b/src/mongo/db/pipeline/pipeline_d.h
@@ -1,5 +1,5 @@
/**
- * Copyright 2012 (c) 10gen Inc.
+ * Copyright (C) 2012-2014 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
@@ -34,6 +34,7 @@ namespace mongo {
class Collection;
class DocumentSourceCursor;
struct ExpressionContext;
+ class OperationContext;
class Pipeline;
class Runner;
@@ -71,6 +72,7 @@ namespace mongo {
* @param pExpCtx the expression context for this pipeline
*/
static boost::shared_ptr<Runner> prepareCursorSource(
+ OperationContext* txn,
Collection* collection,
const intrusive_ptr<Pipeline> &pPipeline,
const intrusive_ptr<ExpressionContext> &pExpCtx);