summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2020-02-19 13:56:46 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-19 19:21:40 +0000
commitfcac5c203ad459cffc85d38c26058ea8a84fb9a3 (patch)
tree4c5836c21acd1d0c720868195a0146bd258fc80e /jstests
parent3805c2bf3921474671fdb6bd78ea17848ecef3d9 (diff)
downloadmongo-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.js8
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);
}