summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chan <jason.chan@mongodb.com>2022-03-23 14:37:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-23 15:06:09 +0000
commitb422e6a280704b8f898d4c98b2576b1aa1e624e1 (patch)
tree54b930994e9fc18b5f9d6ccd9b1a3455426ca4d9
parent6dc78caca1d557df43a554cd0f7f3fbbe121c88a (diff)
downloadmongo-b422e6a280704b8f898d4c98b2576b1aa1e624e1.tar.gz
SERVER-63112 Wait for unstable checkpoint to begin and complete after inserting sentinel collection in startup_recovery_for_restore_restarts.js
-rw-r--r--jstests/replsets/startup_recovery_for_restore_restarts.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/jstests/replsets/startup_recovery_for_restore_restarts.js b/jstests/replsets/startup_recovery_for_restore_restarts.js
index 648696a0296..0fe31dc9cdc 100644
--- a/jstests/replsets/startup_recovery_for_restore_restarts.js
+++ b/jstests/replsets/startup_recovery_for_restore_restarts.js
@@ -27,7 +27,8 @@ const startParams = {
logComponentVerbosity: logLevel,
replBatchLimitOperations: 100
};
-const nodes = rst.startSet({setParameter: startParams});
+const nodes = rst.startSet(
+ {setParameter: startParams, wiredTigerEngineConfigString: 'verbose=[checkpoint_progress:1]'});
let restoreNode = nodes[1];
rst.initiateWithHighElectionTimeout();
const primary = rst.getPrimary();
@@ -135,6 +136,14 @@ assert.soon(() => { // Can't use checklog because we can't connect to the mongo
// hitting it. Occasionally we'll miss a checkpoint as a result of clearing the output, but we'll
// get another one a second later.
clearRawMongoProgramOutput();
+// Ensure the checkpoint starts after the insert.
+assert.soon(() => {
+ return rawMongoProgramOutput().search("WT_VERB_CHECKPOINT.*saving checkpoint snapshot min") !==
+ -1;
+});
+// Ensure that we wait for a checkpoint completed log message that comes strictly after the above
+// checkpoint started message.
+clearRawMongoProgramOutput();
assert.soon(() => {
return rawMongoProgramOutput().search("Completed unstable checkpoint.") !== -1;
});