diff options
author | Jason Zhang <jason.zhang@mongodb.com> | 2022-08-25 17:23:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-31 16:01:51 +0000 |
commit | 71801545d04243ecc51b0ea9ff4d736c3ed45f3a (patch) | |
tree | 399157d0ea9f56bcf538b009acf17d26e751fd82 /jstests/sharding | |
parent | b0bde1c01a675b9d104def92c49753bb8e6438b8 (diff) | |
download | mongo-71801545d04243ecc51b0ea9ff4d736c3ed45f3a.tar.gz |
SERVER-69118 Have retryable findAndModify failover internal transaction test wait until lastCommittedOpTime is recovered after failover
(cherry picked from commit cabbf002eeccb81bc696a3677c2f1d5436d09eef)
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/internal_txns/retryable_findAndModify_commit_and_abort_prepared_txns_after_failover_and_restart.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/internal_txns/retryable_findAndModify_commit_and_abort_prepared_txns_after_failover_and_restart.js b/jstests/sharding/internal_txns/retryable_findAndModify_commit_and_abort_prepared_txns_after_failover_and_restart.js index abd1939c4a3..49d90c683b0 100644 --- a/jstests/sharding/internal_txns/retryable_findAndModify_commit_and_abort_prepared_txns_after_failover_and_restart.js +++ b/jstests/sharding/internal_txns/retryable_findAndModify_commit_and_abort_prepared_txns_after_failover_and_restart.js @@ -190,9 +190,9 @@ function runTest(st, stepDownShard0PrimaryFunc, testOpts = { st.rs0.stopSet(null /* signal */, true /*forRestart */); st.rs0.startSet({restart: true}); st.rs0.getPrimary(); - // Wait for replication since it is illegal to run commitTransaction before the prepare - // oplog entry has been majority committed. - st.rs0.awaitReplication(); + // Wait for replication to recover the lastCommittedOpTime since it is illegal to run + // commitTransaction before the prepare oplog entry has been majority committed. + st.rs0.awaitLastOpCommitted(); }; // Test findAnModify without pre/post image. |