0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

some mr cleaning

This commit is contained in:
Eliot Horowitz 2009-11-05 15:41:51 -05:00
parent 4aeeedc9f6
commit 625190f3b1

View File

@ -409,8 +409,8 @@ namespace mongo {
BSONObj prev; BSONObj prev;
list<BSONObj> all; list<BSONObj> all;
ProgressMeter fpm( db.count( mr.incLong ) );
cursor = db.query( mr.incLong, Query().sort( sortKey ) ); cursor = db.query( mr.incLong, Query().sort( sortKey ) );
while ( cursor->more() ){ while ( cursor->more() ){
BSONObj o = cursor->next().getOwned(); BSONObj o = cursor->next().getOwned();
@ -424,6 +424,7 @@ namespace mongo {
all.clear(); all.clear();
prev = o; prev = o;
all.push_back( o ); all.push_back( o );
fpm.hit();
} }
state.finalReduce( all ); state.finalReduce( all );
@ -436,6 +437,7 @@ namespace mongo {
throw; throw;
} }
db.dropCollection( mr.incLong );
long long finalCount = mr.renameIfNeeded( db ); long long finalCount = mr.renameIfNeeded( db );