summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-22 01:33:27 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-22 01:33:27 -0500
commitde11476677e159fd6043b803c03a32d1d8e67332 (patch)
tree005ca457401b6b79eb03459d532adf89a5d4c8d7
parent5865515aa11e731dbe265bdefa8faf8c5bb21f6f (diff)
downloadmongo-de11476677e159fd6043b803c03a32d1d8e67332.tar.gz
when map/reduce has no output data, rename anyway SERVER-2394
-rw-r--r--db/mr.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/db/mr.cpp b/db/mr.cpp
index 7786c85837b..18f1dc27382 100644
--- a/db/mr.cpp
+++ b/db/mr.cpp
@@ -203,10 +203,8 @@ namespace mongo {
long long renameIfNeeded( DBDirectClient& db ){
if ( finalLong != tempLong ){
db.dropCollection( finalLong );
- if ( db.count( tempLong ) ){
- BSONObj info;
- uassert( 10076 , "rename failed" , db.runCommand( "admin" , BSON( "renameCollection" << tempLong << "to" << finalLong ) , info ) );
- }
+ BSONObj info;
+ uassert( 10076 , "rename failed" , db.runCommand( "admin" , BSON( "renameCollection" << tempLong << "to" << finalLong ) , info ) );
}
return db.count( finalLong );
}