diff options
author | Rishab Joshi <rishab.joshi@mongodb.com> | 2020-11-17 13:45:05 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-17 14:23:10 +0000 |
commit | 4329ffafa3ef2f9ea40b7ff17a6af8604720de12 (patch) | |
tree | 44cad61cfcdb57abccc910e49fa20f4c6fcc81f2 /jstests/sharding/array_shard_key.js | |
parent | 519bc2b24ecc6c29f2483c8b82786e16f61c2cba (diff) | |
download | mongo-4329ffafa3ef2f9ea40b7ff17a6af8604720de12.tar.gz |
SERVER-50442 Remove ensureIndex shell function
This commit replaces all the usages of ensureIndex() with createIndex() in JS tests and JS shell""
Diffstat (limited to 'jstests/sharding/array_shard_key.js')
-rw-r--r-- | jstests/sharding/array_shard_key.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/array_shard_key.js b/jstests/sharding/array_shard_key.js index 3acf841a1b0..686d1d1085f 100644 --- a/jstests/sharding/array_shard_key.js +++ b/jstests/sharding/array_shard_key.js @@ -71,7 +71,7 @@ value = coll.findOne({i: 1}); assert.commandWorked(coll.remove(Object.extend(value, {i: 1}))); assert.eq(coll.find().itcount(), 0); -coll.ensureIndex({_id: 1, i: 1, j: 1}); +coll.createIndex({_id: 1, i: 1, j: 1}); // Can insert document that will make index into a multi-key as long as it's not part of shard // key. coll.remove({}); @@ -119,7 +119,7 @@ for (var i = 0; i < 10; i++) { assert.commandWorked(coll.insert({i: [i, i + 1]})); } -coll.ensureIndex({_id: 1, i: 1}); +coll.createIndex({_id: 1, i: 1}); try { st.shardColl(coll, {_id: 1, i: 1}, {_id: ObjectId(), i: 1}); @@ -136,7 +136,7 @@ for (var i = 0; i < 10; i++) { assert.commandWorked(coll.insert({i: i})); } -coll.ensureIndex({_id: 1, i: 1}); +coll.createIndex({_id: 1, i: 1}); st.shardColl(coll, {_id: 1, i: 1}, {_id: ObjectId(), i: 1}); |