summaryrefslogtreecommitdiff
path: root/jstests/multiVersion
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2013-05-13 12:30:49 -0400
committerGreg Studer <greg@10gen.com>2013-05-13 14:26:16 -0400
commita13b441926ada81d805172aa94243164858c012f (patch)
treebf25a8d82980503df8052db2166cd7cec6ec7b14 /jstests/multiVersion
parent9c046fbf99aada223f2d4d26e331cff0eddc0b98 (diff)
downloadmongo-a13b441926ada81d805172aa94243164858c012f.tar.gz
SERVER-9661 config upgrade v0->v3 fails when dropped collection has noBalance set
Diffstat (limited to 'jstests/multiVersion')
-rw-r--r--jstests/multiVersion/upgrade_cluster_v3_to_v4_db.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/jstests/multiVersion/upgrade_cluster_v3_to_v4_db.js b/jstests/multiVersion/upgrade_cluster_v3_to_v4_db.js
index 46124a8227a..93413f1bfb1 100644
--- a/jstests/multiVersion/upgrade_cluster_v3_to_v4_db.js
+++ b/jstests/multiVersion/upgrade_cluster_v3_to_v4_db.js
@@ -152,7 +152,7 @@ var coll = mongos.getCollection("foo.bar");
printjson(admin.runCommand({ enableSharding : coll.getDB() + "" }));
printjson(admin.runCommand({ shardCollection : coll + "", key : { _id : 1 } }));
-printjson(admin.runCommand({ split : coll + "", middle : { _id : 0 } }));
+printjson(admin.runCommand({ split : coll + "", middle : { _id : 0 } }));
config.collections.update({ _id : coll + "" }, { $set : { lastmodEpoch : ObjectId() }});
assert.eq(null, config.getLastError());
@@ -170,6 +170,11 @@ resetBackupDBs();
jsTest.log("Adding bad (dropped) sharded collection data...")
printjson(coll.drop());
+// Disable balancing on the (dropped) coll to trigger additional collection validation.
+// At least in 2.2, dropping a collection drops the noBalance flag as well, but this has been seen
+// in the wild.
+// TODO: Enable when 2.4.4 comes out
+//sh.disableBalancing( coll );
printjson(config.collections.find().toArray());
// Make sure up