summaryrefslogtreecommitdiff
path: root/jstests/replsets
diff options
context:
space:
mode:
authorPavi Vetriselvan <pvselvan@umich.edu>2019-07-26 16:12:18 -0400
committerPavi Vetriselvan <pvselvan@umich.edu>2019-07-26 16:20:26 -0400
commit4ae9ca6543819f7b6915b18ebf30e7633da78442 (patch)
treec6447873cb8cc4f3b10cbadc660e1930a8bbf3d3 /jstests/replsets
parent94fcb7d03e08014bb6a20ab010539811548d9e83 (diff)
downloadmongo-4ae9ca6543819f7b6915b18ebf30e7633da78442.tar.gz
SERVER-42453 ensure clusterTime advances past afterClusterTime timestamp for read in step_down_on_secondary.js
Diffstat (limited to 'jstests/replsets')
-rw-r--r--jstests/replsets/step_down_on_secondary.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/replsets/step_down_on_secondary.js b/jstests/replsets/step_down_on_secondary.js
index 5563d4a1e23..2a5c279422b 100644
--- a/jstests/replsets/step_down_on_secondary.js
+++ b/jstests/replsets/step_down_on_secondary.js
@@ -85,6 +85,10 @@
"insert", {documents: [{_id: "clusterTimeAfterPrepare"}]}))
.operationTime;
+ // Make sure the insert gets replicated to the old primary (current secondary) so that its
+ // clusterTime advances before we try to do an afterClusterTime read at the time of the insert.
+ rst.awaitReplication();
+
jsTestLog("Do a read that hits a prepare conflict on the old primary");
assert.commandWorked(
primary.adminCommand({configureFailPoint: "WTPrintPrepareConflictLog", mode: "alwaysOn"}));