summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/find_and_modify.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-05-01 21:47:12 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-05-04 17:54:10 -0400
commitef53c2435ea7b041fb06ed30ff3baf0ab8c30466 (patch)
tree028f54200fd61fc97d8f4447013c6f8f0d3b3016 /src/mongo/db/commands/find_and_modify.cpp
parent8fe31447b9d21521aa8022a24b4b1c27747c2ba5 (diff)
downloadmongo-ef53c2435ea7b041fb06ed30ff3baf0ab8c30466.tar.gz
SERVER-13797 Remove more usages of Client::getContext
This change removes additional usages of Client::getContext and replaces them with passing the database directly.
Diffstat (limited to 'src/mongo/db/commands/find_and_modify.cpp')
-rw-r--r--src/mongo/db/commands/find_and_modify.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp
index 01663346e66..e6b92512064 100644
--- a/src/mongo/db/commands/find_and_modify.cpp
+++ b/src/mongo/db/commands/find_and_modify.cpp
@@ -215,7 +215,7 @@ namespace mongo {
if ( remove ) {
_appendHelper( result , doc , found , fields );
if ( found ) {
- deleteObjects( &txn, ns , queryModified , true , true );
+ deleteObjects(&txn, cx.db(), ns, queryModified, true, true);
BSONObjBuilder le( result.subobjStart( "lastErrorObject" ) );
le.appendNumber( "n" , 1 );
le.done();
@@ -245,7 +245,8 @@ namespace mongo {
// the shard version below, but for now no
UpdateLifecycleImpl updateLifecycle(false, requestNs);
request.setLifecycle(&updateLifecycle);
- UpdateResult res = mongo::update(&txn, request, &cc().curop()->debug());
+ UpdateResult res =
+ mongo::update(&txn, cx.db(), request, &cc().curop()->debug());
if ( !collection ) {
// collection created by an upsert
collection = cx.db()->getCollection( ns );