diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-10-23 13:18:48 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-23 13:18:48 +0000 |
commit | 20ca77a7181ad9629b91eae1884664cfaa4e6941 (patch) | |
tree | 8a8b373455e9460758f51344f1e1d5cf0259886e | |
parent | 0fb7557a6bff0930f025b3036bcbb0c1ef0191db (diff) | |
download | mongo-20ca77a7181ad9629b91eae1884664cfaa4e6941.tar.gz |
SERVER-44042 Enable reconstruct_prepared_transactions_initial_sync_index_build.js when two phase index builds are enabled
-rw-r--r-- | jstests/replsets/reconstruct_prepared_transactions_initial_sync_index_build.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/jstests/replsets/reconstruct_prepared_transactions_initial_sync_index_build.js b/jstests/replsets/reconstruct_prepared_transactions_initial_sync_index_build.js index 9fb8b306e51..c09bc058739 100644 --- a/jstests/replsets/reconstruct_prepared_transactions_initial_sync_index_build.js +++ b/jstests/replsets/reconstruct_prepared_transactions_initial_sync_index_build.js @@ -3,11 +3,9 @@ * of initial sync. Additionally, we will test that a background index build blocks this particular * situation until the index build is finished. * - * TODO(SERVER-44042): Remove two_phase_index_builds_unsupported tag. * @tags: [ * uses_transactions, * uses_prepare_transaction, - * two_phase_index_builds_unsupported, * ] */ @@ -91,13 +89,18 @@ jsTestLog("Resuming initial sync"); assert.commandWorked(secondary.adminCommand( {configureFailPoint: "initialSyncHangDuringCollectionClone", mode: "off"})); -// Wait for log message. -assert.soon( - () => - rawMongoProgramOutput().indexOf( - "blocking replication until index builds are finished on test.reconstruct_prepared_transactions_initial_sync_index_build, due to prepared transaction") >= - 0, - "replication not hanging"); +const enableTwoPhaseIndexBuild = + assert.commandWorked(primary.adminCommand({getParameter: 1, enableTwoPhaseIndexBuild: 1})) + .enableTwoPhaseIndexBuild; +if (!enableTwoPhaseIndexBuild) { + // Wait for log message. + assert.soon( + () => + rawMongoProgramOutput().indexOf( + "blocking replication until index builds are finished on test.reconstruct_prepared_transactions_initial_sync_index_build, due to prepared transaction") >= + 0, + "replication not hanging"); +} // Unblock index build. assert.commandWorked( |