summaryrefslogtreecommitdiff
path: root/jstests/readonly
diff options
context:
space:
mode:
authorHugh Han <hughhan1@gmail.com>2017-06-23 14:43:32 -0400
committerHugh Han <hughhan1@gmail.com>2017-07-13 13:45:20 -0400
commit9e478e41643e736104e15d6bc7a3065c19b37e17 (patch)
treef3692decf1e09c0915c64551c7587bf51896b340 /jstests/readonly
parent26a2c5ded2cd5adbd3f18e460dc61f7226a51573 (diff)
downloadmongo-9e478e41643e736104e15d6bc7a3065c19b37e17.tar.gz
SERVER-14761 only allow NumberLong as split key in hashed shard patterns
When a shard uses a hashed key pattern, only NumberLong types may be used as split keys. A small bug in hash_basic.js regarding 'middle' syntax was also fixed. Instead of 10000 to the document as a whole, 10000 is now added to the actual number in the document. A small bug in read_only_test.js regarding the shardColl(...) function was also found. It was fixed to now do what I believe the author originally intended it to do.
Diffstat (limited to 'jstests/readonly')
-rw-r--r--jstests/readonly/lib/read_only_test.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/readonly/lib/read_only_test.js b/jstests/readonly/lib/read_only_test.js
index 5b2775e697a..b34d7470ad5 100644
--- a/jstests/readonly/lib/read_only_test.js
+++ b/jstests/readonly/lib/read_only_test.js
@@ -58,7 +58,7 @@ var StandaloneFixture, ShardedFixture, runReadOnlyTest, zip2, cycleN;
jsTest.log("sharding test collection...");
// Use a hashed shard key so we actually hit multiple shards.
- this.shardingTest.shardColl(test.name, {_id: "hashed"});
+ this.shardingTest.shardColl(test.name, {_id: "hashed"}, false);
test.load(this.shardingTest.getDB("test")[test.name]);
};