diff options
author | Benety Goh <benety@mongodb.com> | 2019-07-07 12:39:22 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-07-07 12:39:37 -0400 |
commit | 1aeaff5c35321a3ffb7e0dbc08c59f633e1dedbf (patch) | |
tree | 8848d6997a0591f7450c3c50edb7f46932c6969e | |
parent | cd671f9d6f9ab95b6dbf34b2233685383bd5fbb3 (diff) | |
download | mongo-1aeaff5c35321a3ffb7e0dbc08c59f633e1dedbf.tar.gz |
SERVER-41968 wait for collection scan phase to start in hybrid index tests
This ensures that we are getting sufficient coverage over the side table logic.
5 files changed, 5 insertions, 5 deletions
diff --git a/jstests/noPassthrough/hybrid_geo_index_remove_invalid_doc.js b/jstests/noPassthrough/hybrid_geo_index_remove_invalid_doc.js index a99533a8bbf..b3f14064fd8 100644 --- a/jstests/noPassthrough/hybrid_geo_index_remove_invalid_doc.js +++ b/jstests/noPassthrough/hybrid_geo_index_remove_invalid_doc.js @@ -46,7 +46,7 @@ {configureFailPoint: 'hangAfterSettingUpIndexBuild', mode: 'alwaysOn'})); const createIdx = IndexBuildTest.startIndexBuild(primary, coll.getFullName(), {b: '2dsphere'}); - IndexBuildTest.waitForIndexBuildToStart(testDB); + IndexBuildTest.waitForIndexBuildToScanCollection(testDB, coll.getName(), 'b_2dsphere'); // Insert a valid geo document to initialize the hybrid index builder's side table state. assert.commandWorked(coll.insert({ diff --git a/jstests/noPassthrough/hybrid_geo_index_update_invalid_doc.js b/jstests/noPassthrough/hybrid_geo_index_update_invalid_doc.js index 3492726334d..e880c74677a 100644 --- a/jstests/noPassthrough/hybrid_geo_index_update_invalid_doc.js +++ b/jstests/noPassthrough/hybrid_geo_index_update_invalid_doc.js @@ -46,7 +46,7 @@ {configureFailPoint: 'hangAfterSettingUpIndexBuild', mode: 'alwaysOn'})); const createIdx = IndexBuildTest.startIndexBuild(primary, coll.getFullName(), {b: '2dsphere'}); - IndexBuildTest.waitForIndexBuildToStart(testDB); + IndexBuildTest.waitForIndexBuildToScanCollection(testDB, coll.getName(), 'b_2dsphere'); // Fixing the invalid geo document should not cause any issues for the side table accounting. assert.commandWorked(coll.update( diff --git a/jstests/noPassthrough/hybrid_partial_geo_index.js b/jstests/noPassthrough/hybrid_partial_geo_index.js index 8e204647cdf..fb0e3ac9388 100644 --- a/jstests/noPassthrough/hybrid_partial_geo_index.js +++ b/jstests/noPassthrough/hybrid_partial_geo_index.js @@ -36,7 +36,7 @@ const partialIndex = {b: '2dsphere'}; const createIdx = IndexBuildTest.startIndexBuild( primary, coll.getFullName(), partialIndex, {partialFilterExpression: {a: {$gt: 0}}}); - IndexBuildTest.waitForIndexBuildToStart(testDB); + IndexBuildTest.waitForIndexBuildToScanCollection(testDB, coll.getName(), 'b_2dsphere'); // This document has an invalid geoJSON format (duplicated points), but will not be indexed. const unindexedDoc = { diff --git a/jstests/noPassthrough/hybrid_partial_index_update.js b/jstests/noPassthrough/hybrid_partial_index_update.js index 79d9f9cb48e..dd8edb18557 100644 --- a/jstests/noPassthrough/hybrid_partial_index_update.js +++ b/jstests/noPassthrough/hybrid_partial_index_update.js @@ -36,7 +36,7 @@ const partialIndex = {a: 1}; const createIdx = IndexBuildTest.startIndexBuild( primary, coll.getFullName(), partialIndex, {partialFilterExpression: {a: 1}}); - IndexBuildTest.waitForIndexBuildToStart(testDB); + IndexBuildTest.waitForIndexBuildToScanCollection(testDB, coll.getName(), 'a_1'); assert.commandWorked(coll.insert({_id: 0, a: 1})); diff --git a/jstests/noPassthrough/hybrid_sparse_compound_geo_index.js b/jstests/noPassthrough/hybrid_sparse_compound_geo_index.js index a6f50f70151..f018d320de9 100644 --- a/jstests/noPassthrough/hybrid_sparse_compound_geo_index.js +++ b/jstests/noPassthrough/hybrid_sparse_compound_geo_index.js @@ -34,7 +34,7 @@ const createIdx = IndexBuildTest.startIndexBuild( primary, coll.getFullName(), {a: 1, b: '2dsphere'}, {sparse: true}); - IndexBuildTest.waitForIndexBuildToStart(testDB); + IndexBuildTest.waitForIndexBuildToScanCollection(testDB, coll.getName(), 'a_1_b_2dsphere'); assert.commandWorked(coll.insert({a: [1, 2]})); |