summaryrefslogtreecommitdiff
path: root/jstests/repl
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-07-30 17:34:46 -0400
committerMathias Stearn <mathias@10gen.com>2014-08-13 17:30:25 -0400
commit00913e47de5aced5267e44e82ac9e976bbaac089 (patch)
tree26002b9f1eb4e7b3f295bd2a4cf24a68aa13cad3 /jstests/repl
parentc610cfe5c58d1f4301f5535d3e166d5d4332bc87 (diff)
downloadmongo-00913e47de5aced5267e44e82ac9e976bbaac089.tar.gz
SERVER-13951 Split index building in to UnitOfWork-sized stages
All index builds now go through the MultiIndexBuilder as its API was already close to ideal. The following tickets have also been addressed by this commit: SERVER-14710 Remove dropDups SERVER-12309 Cloner build indexes in parallel SERVER-14737 Initial sync uses bg index building SERVER-9135 fast index build for initial sync SERVER-2747 can't kill index in phase 2 SERVER-8917 check error code rather than assuming all errors are dups SERVER-14820 compact enforces unique while claiming not to SERVER-14746 IndexRebuilder should be foreground and fail fatally
Diffstat (limited to 'jstests/repl')
-rw-r--r--jstests/repl/drop_dups.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/jstests/repl/drop_dups.js b/jstests/repl/drop_dups.js
deleted file mode 100644
index bd3d2820108..00000000000
--- a/jstests/repl/drop_dups.js
+++ /dev/null
@@ -1,58 +0,0 @@
-
-var rt = new ReplTest( "drop_dups" );
-
-m = rt.start( true );
-s = rt.start( false );
-
-var writeOption = { writeConcern: { w: 2, wtimeout: 3000 }};
-
-am = m.getDB( "foo" );
-as = s.getDB( "foo" );
-
-function run( createInBackground ) {
-
- collName = "foo" + ( createInBackground ? "B" : "F" );
-
- am[collName].drop();
- am.blah.insert({ x: 1 }, writeOption);
- assert.soon( function(){
- return as.blah.findOne();
- }
- );
-
- var bulk = am[collName].initializeUnorderedBulkOp();
- for (var i = 0; i < 10; i++) {
- bulk.insert({ _id: i, x: Math.floor( i / 2 ) });
- }
- assert.writeOK(bulk.execute({ w: 2, wtimeout: 3000 }));
-
- am.runCommand( { "godinsert" : collName , obj : { _id : 100 , x : 20 } } );
- am.runCommand( { "godinsert" : collName , obj : { _id : 101 , x : 20 } } );
-
- as.runCommand( { "godinsert" : collName , obj : { _id : 101 , x : 20 } } );
- as.runCommand( { "godinsert" : collName , obj : { _id : 100 , x : 20 } } );
-
- assert.eq( as[collName].count() , am[collName].count() );
-
- function mymap(z) {
- return z._id + ":" + z.x + ",";
- }
-
- am[collName].ensureIndex( { x : 1 } , { unique : true , dropDups : true , background : createInBackground } );
- am.blah.insert({ x: 1 }, writeOption);
-
- assert.eq( 2 , am[collName].getIndexKeys().length , "A1 : " + createInBackground )
- if (!createInBackground) {
- assert.eq( 2 , as[collName].getIndexKeys().length , "A2 : " + createInBackground )
- }
-
- assert.eq( am[collName].find().sort( { _id : 1 } ).map(mymap) ,
- as[collName].find().sort( { _id : 1 } ).map(mymap) , "different things dropped on master and slave" );
-
-
-}
-
-run( false )
-run( true )
-
-rt.stop()