summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorMartin Bligh <mbligh@mongodb.com>2015-10-21 13:25:24 -0400
committerMartin Bligh <mbligh@mongodb.com>2015-10-21 13:26:52 -0400
commita46d64143bae5b1e66b18cb13683d59d8d986e6b (patch)
tree73da57b8ad77f1b466f45e684f1d98fb56636e05 /src/mongo/db/ops
parentf7f592e92b3146e20d311a35492116d7488e7e2b (diff)
downloadmongo-a46d64143bae5b1e66b18cb13683d59d8d986e6b.tar.gz
SERVER-21048: Stop regetting the collection in deleteObjects
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/delete.cpp7
-rw-r--r--src/mongo/db/ops/delete.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/db/ops/delete.cpp b/src/mongo/db/ops/delete.cpp
index 325b0d36bc0..870deb66dd5 100644
--- a/src/mongo/db/ops/delete.cpp
+++ b/src/mongo/db/ops/delete.cpp
@@ -45,7 +45,7 @@ namespace mongo {
god: allow access to system namespaces, and don't yield
*/
long long deleteObjects(OperationContext* txn,
- Database* db,
+ Collection* collection,
StringData ns,
BSONObj pattern,
PlanExecutor::YieldPolicy policy,
@@ -60,11 +60,6 @@ long long deleteObjects(OperationContext* txn,
request.setFromMigrate(fromMigrate);
request.setYieldPolicy(policy);
- Collection* collection = NULL;
- if (db) {
- collection = db->getCollection(nsString.ns());
- }
-
ParsedDelete parsedDelete(txn, &request);
uassertStatusOK(parsedDelete.parseRequest());
diff --git a/src/mongo/db/ops/delete.h b/src/mongo/db/ops/delete.h
index b4b7345d70b..f45a2674cb4 100644
--- a/src/mongo/db/ops/delete.h
+++ b/src/mongo/db/ops/delete.h
@@ -40,7 +40,7 @@ class Database;
class OperationContext;
long long deleteObjects(OperationContext* txn,
- Database* db,
+ Collection* collection,
StringData ns,
BSONObj pattern,
PlanExecutor::YieldPolicy policy,