diff options
author | Benety Goh <benety@mongodb.com> | 2020-05-06 14:57:25 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-08 12:17:10 +0000 |
commit | d7bf5f4296573a6231a6e816961a9904545f0429 (patch) | |
tree | a97183aa6e3fa111711f50cf32568973db5ea700 /jstests | |
parent | bbdf0a11d1c61be0760a829e82799129beac7be0 (diff) | |
download | mongo-d7bf5f4296573a6231a6e816961a9904545f0429.tar.gz |
SERVER-47635 remove index build from config.system.indexBuilds after completion (commit/abort)
(cherry picked from commit f6f3355081a2e96240bfd6e650549d1ec32dbc5d)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/index_stepdown_failover.js | 2 | ||||
-rw-r--r-- | jstests/noPassthrough/indexbg_killop_primary.js | 3 | ||||
-rw-r--r-- | jstests/noPassthrough/indexbg_killop_primary_after_init.js | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/jstests/noPassthrough/index_stepdown_failover.js b/jstests/noPassthrough/index_stepdown_failover.js index 1877b6ab92c..c0f1905cacf 100644 --- a/jstests/noPassthrough/index_stepdown_failover.js +++ b/jstests/noPassthrough/index_stepdown_failover.js @@ -76,7 +76,7 @@ IndexBuildTest.waitForIndexBuildToStop(newPrimaryDB); IndexBuildTest.assertIndexes(newPrimaryColl, 2, ['_id_', 'a_1']); // Index build should be removed from the config.system.indexBuilds collection. -assert(newPrimary.getCollection('config.system.indexBuilds').findOne({_id: indexBuildUUID})); +assert.isnull(newPrimary.getCollection('config.system.indexBuilds').findOne({_id: indexBuildUUID})); rst.stopSet(); })(); diff --git a/jstests/noPassthrough/indexbg_killop_primary.js b/jstests/noPassthrough/indexbg_killop_primary.js index cc6d5252ffc..4611bcbee17 100644 --- a/jstests/noPassthrough/indexbg_killop_primary.js +++ b/jstests/noPassthrough/indexbg_killop_primary.js @@ -85,7 +85,8 @@ if (IndexBuildTest.supportsTwoPhaseIndexBuild(primary)) { assert.eq(0, ops.length, 'incorrect number of commitIndexBuild oplog entries: ' + tojson(ops)); // Index build should be removed from the config.system.indexBuilds collection. - assert(primary.getCollection('config.system.indexBuilds').findOne({_id: indexBuildUUID})); + assert.isnull( + primary.getCollection('config.system.indexBuilds').findOne({_id: indexBuildUUID})); } else { // The noop oplog entry is the only evidence of the failed single phase index build. let ops = rst.dumpOplog( diff --git a/jstests/noPassthrough/indexbg_killop_primary_after_init.js b/jstests/noPassthrough/indexbg_killop_primary_after_init.js index 9b43b6dee32..a785db3ffeb 100644 --- a/jstests/noPassthrough/indexbg_killop_primary_after_init.js +++ b/jstests/noPassthrough/indexbg_killop_primary_after_init.js @@ -88,7 +88,8 @@ if (IndexBuildTest.supportsTwoPhaseIndexBuild(primary)) { assert.eq(0, ops.length, 'incorrect number of commitIndexBuild oplog entries: ' + tojson(ops)); // Index build should be removed from the config.system.indexBuilds collection. - assert(primary.getCollection('config.system.indexBuilds').findOne({_id: indexBuildUUID})); + assert.isnull( + primary.getCollection('config.system.indexBuilds').findOne({_id: indexBuildUUID})); } else { // The noop oplog entry is the only evidence of the failed single phase index build. let ops = rst.dumpOplog( |