From ac84a0d028eff2b8ca42817d998cb8b34563816c Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Wed, 30 Aug 2017 10:39:34 -0400 Subject: SERVER-30900 removed unnecessary writeConcern from collMod command in ReplSetTest.checkReplicaSet() --- src/mongo/shell/replsettest.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index df65e874dc4..139a8639dc7 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -1136,9 +1136,7 @@ var ReplSetTest = function(opts) { // Since we cannot determine if there is a background index in progress (SERVER-26624), we // use the "collMod" command to wait for any index builds that may be in progress on the - // primary or on one of the secondaries to complete. Running the "collMod" command with a - // write concern of w=<# nodes> on each collection will block until all background index - // builds have completed. + // primary or on one of the secondaries to complete. for (let dbName of primary.getDBNames()) { if (dbName === "local") { continue; @@ -1154,14 +1152,11 @@ var ReplSetTest = function(opts) { // 'usePowerOf2Sizes' is ignored by the server so no actual collection // modification takes place. We intentionally await replication without // doing any I/O to avoid any overhead from allocating or deleting data - // files when using the MMAPv1 storage engine. + // files when using the MMAPv1 storage engine. We call awaitReplication() + // later on to ensure the collMod is replicated to all nodes. assert.commandWorked(dbHandle.runCommand({ collMod: collInfo.name, usePowerOf2Sizes: true, - writeConcern: { - w: self.nodeList().length, - wtimeout: self.kDefaultTimeoutMS, - }, })); } }); -- cgit v1.2.1