Skip to content

Commit

Permalink
Fetch chunks in newest-last order SERVER-1321
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeard0531 committed Jul 1, 2010
1 parent b2afada commit aa7aeab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion s/chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ namespace mongo {

ScopedDbConnection conn( temp.modelServer() );

auto_ptr<DBClientCursor> cursor = conn->query( temp.getNS() , BSON( "ns" << _ns ) );
auto_ptr<DBClientCursor> cursor = conn->query(temp.getNS(), QUERY("ns" << _ns).sort("lastmod",1), 0, 0, 0, 0,
(DEBUG_BUILD ? 2 : 1000000)); // batch size. Try to induce potential race conditions in debug builds
while ( cursor->more() ){
BSONObj d = cursor->next();
if ( d["isMaxMarker"].trueValue() ){
Expand Down

0 comments on commit aa7aeab

Please sign in to comment.