Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SERVER-3529: Sharded map reduce using merge stalls recreating indexes…

… on the output collection
  • Loading branch information...
commit f3bd113e0df642703fda8cc9fe7f6cdf6503e5e8 1 parent bc8b2ef
@agirbal agirbal authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  db/commands/mr.cpp
  2. +4 −0 jstests/sharding/bigMapReduce.js
View
2  db/commands/mr.cpp
@@ -508,7 +508,7 @@ namespace mongo {
_scope->injectNative( "emit" , fast_emit );
- if ( _onDisk ) {
+ if ( _onDisk && _config.incLong != _config.tempLong ) {
// clear temp collections
_db.dropCollection( _config.tempLong );
_db.dropCollection( _config.incLong );
View
4 jstests/sharding/bigMapReduce.js
@@ -67,6 +67,10 @@ for (iter = 0; iter < 5; iter++) {
print("checking result field");
assert.eq(res.result.collection, outCollStr, "Wrong collection " + res.result.collection);
assert.eq(res.result.db, outDbStr, "Wrong db " + res.result.db);
+
+ // make sure final collection has index on _id
+ assert(outDb.system.indexes.count({ns: outDbStr + "." + outCollStr, key: {_id: 1}}) > 0, "No index on _id")
+ assert( gotAGoodOne , "no good for out db" )
}
assert( gotAGoodOne , "no good for out db" )
Please sign in to comment.
Something went wrong with that request. Please try again.