diff options
author | Randolph Tan <randolph@10gen.com> | 2016-10-07 16:09:07 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2016-10-10 16:36:57 -0400 |
commit | 27b771a1805871c1a87fab70d38e44b072b22c7f (patch) | |
tree | 0b4fdcb4dfd1115a1cfb5a51ad4cee2595d9fbb9 /jstests | |
parent | 6d6e6cd20be66afb38e4f27406903a492f4b81ad (diff) | |
download | mongo-27b771a1805871c1a87fab70d38e44b072b22c7f.tar.gz |
SERVER-26527 scale down jumbo1.js
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/jumbo1.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/jstests/sharding/jumbo1.js b/jstests/sharding/jumbo1.js index 315cd3ee6b6..ee5516b0bd7 100644 --- a/jstests/sharding/jumbo1.js +++ b/jstests/sharding/jumbo1.js @@ -16,23 +16,17 @@ var x = 0; var bulk = db.foo.initializeUnorderedBulkOp(); - for (; x < 500; x++) { - bulk.insert({x: x, big: big}); - } - for (var i = 0; i < 500; i++) { bulk.insert({x: x, big: big}); } - for (; x < 2000; x++) { + for (; x < 1500; x++) { bulk.insert({x: x, big: big}); } assert.writeOK(bulk.execute()); s.printShardingStatus(true); - assert.commandWorked(s.s0.adminCommand({moveChunk: 'test.foo', find: {x: 0}, to: 'shard0000'})); - s.printShardingStatus(true); s.startBalancer(); @@ -49,6 +43,13 @@ return d < 5; }, "balance didn't happen", 1000 * 60 * 5, 5000); + 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'); + // TODO: SERVER-26531 Make sure that balancer marked the first chunk as jumbo. + // Assumption: balancer favors moving the lowest valued chunk out of a shard. + // assert(jumboChunk.jumbo, tojson(jumboChunk)); + s.stop(); })(); |