diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-05-29 15:36:28 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-05-30 12:10:16 -0400 |
commit | a78d754b67040c19714bc4696dd7feb5ce10d412 (patch) | |
tree | aaf640483eff976ff22fdaceb9ebfa78f7659af2 /src/mongo/db/commands/index_filter_commands.cpp | |
parent | 4edbe14669b7804180d8b58549e257ceb679bb1d (diff) | |
download | mongo-a78d754b67040c19714bc4696dd7feb5ce10d412.tar.gz |
SERVER-13641 Plumb OperationContext through to getCollection and all Helpers
Diffstat (limited to 'src/mongo/db/commands/index_filter_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/index_filter_commands.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index efc92edd3a3..b07d6086c35 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -65,12 +65,12 @@ namespace { /** * Retrieves a collection's query settings and plan cache from the database. */ - Status getQuerySettingsAndPlanCache(Database* db, const string& ns, + Status getQuerySettingsAndPlanCache(OperationContext* txn, Database* db, const string& ns, QuerySettings** querySettingsOut, PlanCache** planCacheOut) { invariant(db); - Collection* collection = db->getCollection(ns); + Collection* collection = db->getCollection(txn, ns); if (NULL == collection) { return Status(ErrorCodes::BadValue, "no such collection"); } @@ -169,7 +169,7 @@ namespace mongo { Client::Context& ctx = readCtx.ctx(); QuerySettings* querySettings; PlanCache* unused; - Status status = getQuerySettingsAndPlanCache(ctx.db(), ns, &querySettings, &unused); + Status status = getQuerySettingsAndPlanCache(txn, ctx.db(), ns, &querySettings, &unused); if (!status.isOK()) { // No collection - return empty array of filters. BSONArrayBuilder hintsBuilder(bob->subarrayStart("filters")); @@ -231,7 +231,7 @@ namespace mongo { Client::Context& ctx = readCtx.ctx(); QuerySettings* querySettings; PlanCache* planCache; - Status status = getQuerySettingsAndPlanCache(ctx.db(), ns, &querySettings, &planCache); + Status status = getQuerySettingsAndPlanCache(txn, ctx.db(), ns, &querySettings, &planCache); if (!status.isOK()) { // No collection - do nothing. return Status::OK(); @@ -322,7 +322,7 @@ namespace mongo { Client::Context& ctx = readCtx.ctx(); QuerySettings* querySettings; PlanCache* planCache; - Status status = getQuerySettingsAndPlanCache(ctx.db(), ns, &querySettings, &planCache); + Status status = getQuerySettingsAndPlanCache(txn, ctx.db(), ns, &querySettings, &planCache); if (!status.isOK()) { return status; } |