diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2021-03-19 18:01:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-24 00:29:00 +0000 |
commit | 1f6a01da46ea6b3a56cefdd17e276de9d03c8721 (patch) | |
tree | acaa90af47ff8153c2024a87430b8203c5583624 /jstests | |
parent | 5fe45689b6eb936190203c66b506d5d042a76eb0 (diff) | |
download | mongo-1f6a01da46ea6b3a56cefdd17e276de9d03c8721.tar.gz |
SERVER-55370 Fix drop_indexes_aborts_in_progress_index_builds_wildcard.js behaviour with BackgroundOperationInProgressForNamespace
(cherry picked from commit a97002800ba3597cea321cae42298da4a3b12626)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/drop_indexes_aborts_in_progress_index_builds_wildcard.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/jstests/noPassthrough/drop_indexes_aborts_in_progress_index_builds_wildcard.js b/jstests/noPassthrough/drop_indexes_aborts_in_progress_index_builds_wildcard.js index 5bf8855d620..5de783fd099 100644 --- a/jstests/noPassthrough/drop_indexes_aborts_in_progress_index_builds_wildcard.js +++ b/jstests/noPassthrough/drop_indexes_aborts_in_progress_index_builds_wildcard.js @@ -26,7 +26,6 @@ testDB.getCollection(collName).drop(); assert.commandWorked(testDB.createCollection(collName)); const coll = testDB.getCollection(collName); -jsTest.log("Aborting all index builders and ready indexes with '*' wildcard"); assert.commandWorked(testDB.getCollection(collName).insert({a: 1})); assert.commandWorked(testDB.getCollection(collName).insert({b: 1})); @@ -42,18 +41,15 @@ const awaitSecondIndexBuild = IndexBuildTest.startIndexBuild( testDB.getMongo(), coll.getFullName(), {b: 1}, {}, [ErrorCodes.IndexBuildAborted]); IndexBuildTest.waitForIndexBuildToScanCollection(testDB, collName, "b_1"); -const awaitDropIndex = startParallelShell(() => { - const testDB = db.getSiblingDB(TestData.dbName); - assert.commandWorked(testDB.runCommand({dropIndexes: TestData.collName, index: "*"})); -}, conn.port); - +jsTest.log("Aborting all index builders and ready indexes with '*' wildcard"); +assert.commandWorked(testDB.runCommand({dropIndexes: collName, index: "*"})); checkLog.containsJson(testDB.getMongo(), 23879); // "About to abort all index builders" + IndexBuildTest.resumeIndexBuilds(testDB.getMongo()); awaitFirstIndexBuild(); awaitSecondIndexBuild(); -awaitDropIndex(); -assert.eq(1, testDB.getCollection(collName).getIndexes().length); +assert.eq(1, testDB.getCollection(collName).getIndexes().length); // _id index MongoRunner.stopMongod(conn); }()); |