summaryrefslogtreecommitdiff
path: root/jstests/replsets
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-05-18 10:33:40 -0400
committerEric Milkie <milkie@10gen.com>2012-05-18 14:43:55 -0400
commitfdc9fead639e96af96a0ed33d67576043fa7bb6c (patch)
tree1b82e16cc27cc6b4ebaf0ca92449f9d9d20ce2ee /jstests/replsets
parent161960373175779914c093be70fa06dde3b60909 (diff)
downloadmongo-fdc9fead639e96af96a0ed33d67576043fa7bb6c.tar.gz
SERVER-5040 retry initial sync if errors occur when creating indexes
If you clone a database and a document, due to an update, moves forward in memory, cloner might clone both the old and new document. When this happens, creating a unique index might fail. This change restarts the clone when this happens, and will abort after 3 failed cloning attempts.
Diffstat (limited to 'jstests/replsets')
-rw-r--r--jstests/replsets/replset7.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/jstests/replsets/replset7.js b/jstests/replsets/replset7.js
index b8a8f901f13..f29c1fbb953 100644
--- a/jstests/replsets/replset7.js
+++ b/jstests/replsets/replset7.js
@@ -1,6 +1,6 @@
// test for SERVER-5040 - if documents move forward during an initial sync.
-if ( 0 ) { // SERVER-5040
+
var rt = new ReplSetTest( { name : "replset7tests" , nodes: 1 } );
var nodes = rt.startSet();
@@ -44,4 +44,3 @@ rt.awaitSecondaryNodes();
// Do we have an index?
assert.eq (1, slave.getDB( 'd' )['system.indexes']
.find({"v" : 1,"key" : {"x" : 1},"unique" : true,"ns" : "d.c","name" : "x_1"}).count());
-} \ No newline at end of file