From 4329ffafa3ef2f9ea40b7ff17a6af8604720de12 Mon Sep 17 00:00:00 2001 From: Rishab Joshi Date: Tue, 17 Nov 2020 13:45:05 +0000 Subject: SERVER-50442 Remove ensureIndex shell function This commit replaces all the usages of ensureIndex() with createIndex() in JS tests and JS shell"" --- jstests/sharding/array_shard_key.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'jstests/sharding/array_shard_key.js') 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}); -- cgit v1.2.1