diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-07-21 09:39:14 -0400 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-07-21 09:39:14 -0400 |
commit | c0f3e44d3e6916f3d5e27959b98276189763ba15 (patch) | |
tree | 0ae62a6d8928afc4bb54fd3c539ec103932ab0e3 /jstests | |
parent | 980f3f24b66e0721a3b4de3e8815a9d02430a68d (diff) | |
download | mongo-c0f3e44d3e6916f3d5e27959b98276189763ba15.tar.gz |
Revert "SERVER-25146 JS replset dbhash hook fails when checking nindexes with a collection containing a background index"
This reverts commit b50b45cf18c0a1a45384777929b78985f098425c.
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/hooks/check_repl_dbhash.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/jstests/hooks/check_repl_dbhash.js b/jstests/hooks/check_repl_dbhash.js index db4db45b6b2..b87d8f5cdfa 100644 --- a/jstests/hooks/check_repl_dbhash.js +++ b/jstests/hooks/check_repl_dbhash.js @@ -76,29 +76,6 @@ function dumpCollectionDiff(primary, secondary, dbName, collName) { } function checkDBHashes(rst, dbBlacklist, phase) { - function generateUniqueDbName(dbNameSet, prefix) { - var uniqueDbName; - Random.setRandomSeed(); - do { - uniqueDbName = prefix + Random.randInt(100000); - } while (dbNameSet.has(uniqueDbName)); - return uniqueDbName; - } - - // Since we cannot determine if there is a background index in progress (SERVER-25176), we flush - // indexing as follows: - // 1. Drop a dummy collection - // 2. Create a foreground index on the dummy collection - // 3. Insert a document into the dummy collection with a writeConcern for all nodes - var dbNames = new Set(primary.getDBNames()); - var uniqueDbName = generateUniqueDbName(dbNames, "flush_all_background_indexes_"); - - var dummyColl = primary.getDB(uniqueDbName).dummy; - dummyColl.drop(); - assert.commandWorked(dummyColl.createIndex({x: 1})); - assert.writeOK( - dummyColl.insert({x: 1}, {writeConcern: {w: rst.nodes.length, wtimeout: 5 * 60 * 1000}})); - // We don't expect the local database to match because some of its collections are not // replicated. dbBlacklist.push('local'); |