diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-04-29 12:35:36 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-04-29 12:35:36 -0400 |
commit | aeabb978d4b84aa795fa067cc3773a3f7f3c6673 (patch) | |
tree | 9340a9f64f36894900e7210ae51f668be86a6408 /s/d_logic.cpp | |
parent | 86bf00a35c35e78bf8c9abe37c9d90b306c0f366 (diff) | |
download | mongo-aeabb978d4b84aa795fa067cc3773a3f7f3c6673.tar.gz |
chunk migration cleaning
Diffstat (limited to 's/d_logic.cpp')
-rw-r--r-- | s/d_logic.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/s/d_logic.cpp b/s/d_logic.cpp index 1e14a1eab6a..c6188c07bcc 100644 --- a/s/d_logic.cpp +++ b/s/d_logic.cpp @@ -29,6 +29,7 @@ #include "../db/commands.h" #include "../db/jsobj.h" #include "../db/dbmessage.h" +#include "../db/query.h" #include "../client/connpool.h" @@ -418,11 +419,13 @@ namespace mongo { // wait until cursors are clean cout << "WARNING: deleting data before ensuring no more cursors TODO" << endl; - dbtemprelease unlock; - - DBDirectClient client; - BSONObj removeFilter = finishToken.getObjectField( "query" ); - client.remove( ns , removeFilter ); + { + BSONObj removeFilter = finishToken.getObjectField( "query" ); + Client::Context ctx(ns); + long long num = deleteObjects( ns.c_str() , removeFilter , false , true ); + log() << "movechunk.finish deleted: " << num << endl; + result.appendNumber( "numDeleted" , num ); + } return true; } |