diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-07-12 12:50:39 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-07-12 12:50:39 -0400 |
commit | e04e197dc9e7e1ddeba6ce47bdf45c51bb5ed20e (patch) | |
tree | 3e8aa53aee7d86e844d41362e70fdf1a07ff947f | |
parent | 6fda68e42adc09210537c8f3dcc7e811787960d7 (diff) | |
download | mongo-e04e197dc9e7e1ddeba6ce47bdf45c51bb5ed20e.tar.gz |
SERVER-41823 Wait for prepare to be majority committed before committing in index_builds_ignore_prepare_conflicts.js
-rw-r--r-- | jstests/noPassthrough/index_builds_ignore_prepare_conflicts.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/noPassthrough/index_builds_ignore_prepare_conflicts.js b/jstests/noPassthrough/index_builds_ignore_prepare_conflicts.js index 817bdf5901c..f5a0a64eea6 100644 --- a/jstests/noPassthrough/index_builds_ignore_prepare_conflicts.js +++ b/jstests/noPassthrough/index_builds_ignore_prepare_conflicts.js @@ -90,6 +90,10 @@ assert.eq(undefined, op.prepareReadConflicts); }); + // Because prepare uses w:1, ensure it is majority committed before committing the + // transaction. + PrepareHelpers.awaitMajorityCommitted(replSetTest, prepareTimestamp); + // Commit the transaction before completing the index build, releasing locks which will // allow the index build to complete. assert.commandWorked(PrepareHelpers.commitTransaction(session, prepareTimestamp)); |