diff options
author | Aaron <aaron@10gen.com> | 2010-05-25 16:01:06 -0700 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-05-25 16:01:06 -0700 |
commit | 349d039224e9885723f60ec5d46dffdc6689e69f (patch) | |
tree | 65484cba7c2f96c7dfd89a167b5758a07dbe417d /db/mr.cpp | |
parent | b2a9ff3aeac23468b2008ff8c70cc5771c14d3cb (diff) | |
download | mongo-349d039224e9885723f60ec5d46dffdc6689e69f.tar.gz |
SERVER-109 finish rewriting bestGuess code path
Diffstat (limited to 'db/mr.cpp')
-rw-r--r-- | db/mr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/db/mr.cpp b/db/mr.cpp index d3944c8e056..46f5d1fefae 100644 --- a/db/mr.cpp +++ b/db/mr.cpp @@ -452,12 +452,9 @@ namespace mongo { readlock lock( mr.ns ); Client::Context ctx( mr.ns ); - shared_ptr<Cursor> temp = MultiPlanScanner(mr.ns.c_str() , mr.filter , BSONObj() ).getBestGuess()->newCursor(); + shared_ptr<Cursor> temp = bestGuessCursor( mr.ns.c_str(), mr.filter, BSONObj() ); auto_ptr<ClientCursor> cursor( new ClientCursor( QueryOption_NoCursorTimeout , temp , mr.ns.c_str() ) ); - if ( ! mr.filter.isEmpty() ) - cursor->matcher.reset( new CoveredIndexMatcher( mr.filter , cursor->indexKeyPattern() ) ); - Timer mt; while ( cursor->ok() ){ @@ -533,7 +530,7 @@ namespace mongo { assert( pm == op->setMessage( "m/r: (3/3) final reduce to collection" , db.count( mr.incLong ) ) ); - shared_ptr<Cursor> temp = MultiPlanScanner(mr.incLong.c_str() , BSONObj() , sortKey ).getBestGuess()->newCursor(); + shared_ptr<Cursor> temp = bestGuessCursor( mr.incLong.c_str() , BSONObj() , sortKey ); auto_ptr<ClientCursor> cursor( new ClientCursor( QueryOption_NoCursorTimeout , temp , mr.incLong.c_str() ) ); while ( cursor->ok() ){ |