summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2022-02-02 21:16:51 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-02 22:10:21 +0000
commit073c6a2ce8809aeea6e2e35d3f6cdb006ef66765 (patch)
tree651d88176321c24b5a25dc42a42d04d0190630a6 /jstests
parent665be5b80a080159adfb6617d5ce70030d9fd2fd (diff)
downloadmongo-073c6a2ce8809aeea6e2e35d3f6cdb006ef66765.tar.gz
SERVER-62745: Clear appliedThrough after startupRecoveryForRestore
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