diff options
author | Pavi Vetriselvan <pvselvan@umich.edu> | 2019-07-26 16:12:18 -0400 |
---|---|---|
committer | Pavi Vetriselvan <pvselvan@umich.edu> | 2019-07-26 16:20:26 -0400 |
commit | 4ae9ca6543819f7b6915b18ebf30e7633da78442 (patch) | |
tree | c6447873cb8cc4f3b10cbadc660e1930a8bbf3d3 | |
parent | 94fcb7d03e08014bb6a20ab010539811548d9e83 (diff) | |
download | mongo-4ae9ca6543819f7b6915b18ebf30e7633da78442.tar.gz |
SERVER-42453 ensure clusterTime advances past afterClusterTime timestamp for read in step_down_on_secondary.js
-rw-r--r-- | jstests/replsets/step_down_on_secondary.js | 4 |
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"})); |