diff options
Diffstat (limited to 'jstests/replsets/startup_recovery_for_restore.js')
-rw-r--r-- | jstests/replsets/startup_recovery_for_restore.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/replsets/startup_recovery_for_restore.js b/jstests/replsets/startup_recovery_for_restore.js index a20ec3199b5..4af773c50d0 100644 --- a/jstests/replsets/startup_recovery_for_restore.js +++ b/jstests/replsets/startup_recovery_for_restore.js @@ -126,8 +126,9 @@ assert.commandFailed(restoreNode.adminCommand({fsync: 1})); jsTestLog("Doing more write on the primary"); assert.commandWorked(db.runCommand({insert: sentinelCollName, documents: [{_id: "s3"}]})); -// Make sure we can read the new write on the restore node. -rst.awaitReplication(undefined, undefined, [restoreNode]); +// Make sure we can read the new write on the restore node. Must be durable because we're about +// to crash this node with no checkpoints. +rst.awaitReplication(undefined, ReplSetTest.OpTimeType.LAST_DURABLE, [restoreNode]); assert.eq(3, restoreNode.getDB(dbName)[sentinelCollName].find({}).itcount()); jsTestLog("Crashing restore node before it takes the first stable checkpoint"); |