diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-10-25 16:30:38 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-10-26 15:19:13 -0400 |
commit | d187c9ee45046a32c2fde033550f4ddbc6229794 (patch) | |
tree | 458f3fd8479d44f41da0679a667e435558d0b380 /jstests/sharding | |
parent | 5077c3a69145577c3193ea4c0111cdee415e1de6 (diff) | |
download | mongo-d187c9ee45046a32c2fde033550f4ddbc6229794.tar.gz |
SERVER-26769 Balancer loads balancer settings before recovery and accepting/starting new migrations
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/jumbo1.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/sharding/jumbo1.js b/jstests/sharding/jumbo1.js index ee5516b0bd7..f3f0e8d2a9d 100644 --- a/jstests/sharding/jumbo1.js +++ b/jstests/sharding/jumbo1.js @@ -14,12 +14,15 @@ big += "."; } + // Create sufficient documents to create a jumbo chunk, and use the same shard key in all of + // them so that the chunk cannot be split. var x = 0; var bulk = db.foo.initializeUnorderedBulkOp(); for (var i = 0; i < 500; i++) { bulk.insert({x: x, big: big}); } + // Create documents with different shard keys that can be split and moved without issue. for (; x < 1500; x++) { bulk.insert({x: x, big: big}); } @@ -43,6 +46,7 @@ return d < 5; }, "balance didn't happen", 1000 * 60 * 5, 5000); + // Check that the jumbo chunk did not move, which shouldn't be possible. var jumboChunk = s.getDB('config').chunks.findOne({ns: 'test.foo', min: {$lte: {x: 0}}, max: {$gt: {x: 0}}}); assert.eq('shard0001', jumboChunk.shard, 'jumbo chunk ' + tojson(jumboChunk) + ' was moved'); |