Permalink
Browse files

fix for test case

  • Loading branch information...
1 parent b96bd28 commit 478b0818cf737b810f4c10bd0877890670ff7364 gregs committed Aug 4, 2011
Showing with 7 additions and 1 deletion.
  1. +1 −0 db/queryoptimizer.cpp
  2. +6 −1 jstests/geo_mapreduce2.js
View
@@ -571,6 +571,7 @@ namespace mongo {
return op;
}
+ // Avoid an infinite loop here
uassert( 15878, str::stream() << "query ops not successful even after cleared indices", ! retried );
// Retry with all candidate plans.
@@ -24,8 +24,13 @@ r = function( key, values ) {
return { count : total }
};
-coll.mapReduce( m, r,
+try{ coll.mapReduce( m, r,
{ out : coll.getName() + "_mr",
sort : { _id : 1 },
query : { 'location' : { $within : { $centerSphere : [[ 10, 20 ], 0.01 ] } } } })
+}
+catch( e ){
+ // This should occur, since we can't in-mem sort for mreduce
+ printjson( e )
+}

0 comments on commit 478b081

Please sign in to comment.