diff options
author | Benety Goh <benety@mongodb.com> | 2020-02-19 13:56:46 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-19 19:21:40 +0000 |
commit | fcac5c203ad459cffc85d38c26058ea8a84fb9a3 (patch) | |
tree | 4c5836c21acd1d0c720868195a0146bd258fc80e /jstests | |
parent | 3805c2bf3921474671fdb6bd78ea17848ecef3d9 (diff) | |
download | mongo-fcac5c203ad459cffc85d38c26058ea8a84fb9a3.tar.gz |
SERVER-39453 initial sync ignores in-progress index builds when cloning collections
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/libs/index_initial_sync.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/noPassthrough/libs/index_initial_sync.js b/jstests/noPassthrough/libs/index_initial_sync.js index a980884c403..9ec16580798 100644 --- a/jstests/noPassthrough/libs/index_initial_sync.js +++ b/jstests/noPassthrough/libs/index_initial_sync.js @@ -52,8 +52,12 @@ var IndexInitialSyncTest = function(options) { const secondaryDB = secondary.getDB(testDB.getName()); const secondaryColl = secondaryDB.getCollection(coll.getName()); try { - IndexBuildTest.assertIndexes( - secondaryColl, 2, ['_id_', 'a_1'], [], {includeBuildUUIDs: true}); + if (IndexBuildTest.supportsTwoPhaseIndexBuild(primary)) { + IndexBuildTest.assertIndexes( + secondaryColl, 1, ['_id_'], [], {includeBuildUUIDs: true}); + } else { + IndexBuildTest.assertIndexes(secondaryColl, 2, ['_id_', 'a_1']); + } } finally { IndexBuildTest.resumeIndexBuilds(primary); } |