diff options
author | Maria van Keulen <maria.vankeulen@mongodb.com> | 2019-11-15 00:10:31 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-15 00:10:31 +0000 |
commit | eca93e6211d6a9dc7893d9de8ebef8f99d6d8cc9 (patch) | |
tree | c7c6291a9a7e96ead2d33bce31510a74d92545b1 | |
parent | 5b43207cb4b6b34d9a2c7e64fc9697c629f2d1dd (diff) | |
download | mongo-eca93e6211d6a9dc7893d9de8ebef8f99d6d8cc9.tar.gz |
SERVER-42393 Fix initial sync race in assertStartInReplSet
(cherry picked from commit 9fd91d29a22fb17017deccd92b642e3c2d494290)
-rw-r--r-- | jstests/disk/libs/wt_file_helper.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/disk/libs/wt_file_helper.js b/jstests/disk/libs/wt_file_helper.js index 75bd3688301..95b4e7d8411 100644 --- a/jstests/disk/libs/wt_file_helper.js +++ b/jstests/disk/libs/wt_file_helper.js @@ -123,15 +123,16 @@ let assertStartAndStopStandaloneOnExistingDbpath = function(dbpath, port, testFu * Returns the started node. */ let assertStartInReplSet = function(replSet, originalNode, cleanData, expectResync, testFunc) { - jsTestLog("The node should rejoin the replica set. Clean data: " + cleanData, + jsTestLog("The node should rejoin the replica set. Clean data: " + cleanData + ". Expect resync: " + expectResync); - let node = replSet.start( - originalNode, {dbpath: originalNode.dbpath, port: originalNode.port, restart: !cleanData}); - // Skip clearing initial sync progress after a successful initial sync attempt so that we // can check initialSyncStatus fields after initial sync is complete. - assert.commandWorked( - node.adminCommand({configureFailPoint: 'skipClearInitialSyncState', mode: 'alwaysOn'})); + let node = replSet.start(originalNode, { + dbpath: originalNode.dbpath, + port: originalNode.port, + restart: !cleanData, + setParameter: {"failpoint.skipClearInitialSyncState": "{'mode':'alwaysOn'}"} + }); replSet.awaitSecondaryNodes(); |