summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-08-25 17:25:39 -0400
committerEliot Horowitz <eliot@10gen.com>2014-08-25 18:08:37 -0400
commitf0bb5123f50bb617eb9499539f01779c6e9f5e95 (patch)
tree98cc4abf3c89881691158345435523c5dd6ae37f /src/mongo/db/ops
parentcb3f5cfa43d9565675d2f36c4b0f7cecbad47a49 (diff)
downloadmongo-f0bb5123f50bb617eb9499539f01779c6e9f5e95.tar.gz
SERVER-13635: OperationContext on read paths
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/update.cpp2
-rw-r--r--src/mongo/db/ops/update_lifecycle.h4
-rw-r--r--src/mongo/db/ops/update_lifecycle_impl.cpp4
-rw-r--r--src/mongo/db/ops/update_lifecycle_impl.h2
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp
index 2a3f9a5e549..301e89a13fd 100644
--- a/src/mongo/db/ops/update.cpp
+++ b/src/mongo/db/ops/update.cpp
@@ -99,7 +99,7 @@ namespace mongo {
if (lifecycle) {
lifecycle->setCollection(collection);
- driver->refreshIndexKeys(lifecycle->getIndexKeys());
+ driver->refreshIndexKeys(lifecycle->getIndexKeys(request.getOpCtx()));
}
PlanExecutor* rawExec;
diff --git a/src/mongo/db/ops/update_lifecycle.h b/src/mongo/db/ops/update_lifecycle.h
index ed5b55d3e5d..c0aa86695da 100644
--- a/src/mongo/db/ops/update_lifecycle.h
+++ b/src/mongo/db/ops/update_lifecycle.h
@@ -34,6 +34,8 @@
namespace mongo {
+ class OperationContext;
+
class UpdateLifecycle {
public:
@@ -56,7 +58,7 @@ namespace mongo {
/**
* Return a pointer to any indexes if there is a collection.
*/
- virtual const UpdateIndexData* getIndexKeys() const = 0;
+ virtual const UpdateIndexData* getIndexKeys( OperationContext* opCtx ) const = 0;
/**
* Returns the shard keys as immutable fields
diff --git a/src/mongo/db/ops/update_lifecycle_impl.cpp b/src/mongo/db/ops/update_lifecycle_impl.cpp
index 87648c37403..9a0c15e61fd 100644
--- a/src/mongo/db/ops/update_lifecycle_impl.cpp
+++ b/src/mongo/db/ops/update_lifecycle_impl.cpp
@@ -61,9 +61,9 @@ namespace mongo {
return _collection;
}
- const UpdateIndexData* UpdateLifecycleImpl::getIndexKeys() const {
+ const UpdateIndexData* UpdateLifecycleImpl::getIndexKeys(OperationContext* opCtx) const {
if (_collection)
- return &_collection->infoCache()->indexKeys();
+ return &_collection->infoCache()->indexKeys(opCtx);
return NULL;
}
diff --git a/src/mongo/db/ops/update_lifecycle_impl.h b/src/mongo/db/ops/update_lifecycle_impl.h
index fa612463757..c321b43912d 100644
--- a/src/mongo/db/ops/update_lifecycle_impl.h
+++ b/src/mongo/db/ops/update_lifecycle_impl.h
@@ -52,7 +52,7 @@ namespace mongo {
virtual bool canContinue() const;
- virtual const UpdateIndexData* getIndexKeys() const;
+ virtual const UpdateIndexData* getIndexKeys(OperationContext* opCtx) const;
virtual const std::vector<FieldRef*>* getImmutableFields() const;