summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/startup_recovery_for_restore.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/replsets/startup_recovery_for_restore.js b/jstests/replsets/startup_recovery_for_restore.js
index 4af773c50d0..9d2d749064d 100644
--- a/jstests/replsets/startup_recovery_for_restore.js
+++ b/jstests/replsets/startup_recovery_for_restore.js
@@ -103,6 +103,11 @@ restoreNode = rst.restart(restoreNode, {
// Make sure we can read something after standalone recovery.
assert.eq(2, restoreNode.getDB(dbName)[sentinelCollName].find({}).itcount());
+// Test that appliedThrough still exists in the minValid document after standalone recovery with
+// takeUnstableCheckpointOnShutdown.
+let minValid = restoreNode.getCollection('local.replset.minvalid').findOne();
+assert(minValid.hasOwnProperty('begin'), tojson(minValid));
+
jsTestLog("Restarting restore node again, in repl set mode with stable checkpointing disabled");
restoreNode = rst.restart(restoreNode, {
noReplSet: false,
@@ -113,8 +118,8 @@ restoreNode = rst.restart(restoreNode, {
rst.awaitSecondaryNodes(undefined, [restoreNode]);
jsTestLog("Finished restarting restore node with stable checkpointing disabled");
-// Test that no appliedThrough in the minValid document after recovery.
-const minValid = restoreNode.getCollection('local.replset.minvalid').findOne();
+// Test that no appliedThrough in the minValid document after replication recovery.
+minValid = restoreNode.getCollection('local.replset.minvalid').findOne();
assert(!minValid.hasOwnProperty('begin'), tojson(minValid));
// Test that we cannot take another checkpoint via fsync before we have an up-to-date stable