diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2020-01-03 14:43:49 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-03 14:43:49 +0000 |
commit | 1127133d8095c9deb4afa6d36cc22e376a8b0edb (patch) | |
tree | 2c7fe6bdbb1b97b685265626707704d7b29a9973 /jstests/noPassthroughWithMongod | |
parent | 4c0244f3d42b62d143383f4be17aace206fb86b9 (diff) | |
download | mongo-1127133d8095c9deb4afa6d36cc22e376a8b0edb.tar.gz |
SERVER-44443 Use a large 'syncdelay' value in background_validation_checkpoint_existence.js to prevent checkpoints from being taken
Diffstat (limited to 'jstests/noPassthroughWithMongod')
-rw-r--r-- | jstests/noPassthroughWithMongod/background_validation_checkpoint_existence.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/jstests/noPassthroughWithMongod/background_validation_checkpoint_existence.js b/jstests/noPassthroughWithMongod/background_validation_checkpoint_existence.js deleted file mode 100644 index 5d243e9f557..00000000000 --- a/jstests/noPassthroughWithMongod/background_validation_checkpoint_existence.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Tests that validating a collection in the background that has not been checkpointed yet does no - * validation. In addition, ensures that background validation skips indexes that are not yet - * checkpointed. - * - * @tags: [requires_fsync, requires_wiredtiger, requires_persistence] - */ -(function() { -'use strict'; - -const collName = "background_validation_checkpoint_existence"; - -const forceCheckpoint = () => { - assert.commandWorked(db.fsyncLock()); - assert.commandWorked(db.fsyncUnlock()); -}; - -assert.commandWorked(db.createCollection(collName)); -const coll = db.getCollection(collName); - -for (let i = 0; i < 5; i++) { - assert.commandWorked(coll.insert({x: i})); -} - -// The collection has not been checkpointed yet, so there is nothing to validate. -let res = assert.commandWorked(db.runCommand({validate: collName, background: true})); -assert.eq(true, res.valid); -assert.eq(false, res.hasOwnProperty("nrecords")); -assert.eq(false, res.hasOwnProperty("nIndexes")); - -forceCheckpoint(); - -res = assert.commandWorked(db.runCommand({validate: collName, background: true})); -assert.eq(true, res.valid); -assert.eq(true, res.hasOwnProperty("nrecords")); -assert.eq(true, res.hasOwnProperty("nIndexes")); - -assert.commandWorked(coll.createIndex({x: 1})); - -// Shouldn't validate the newly created index here as it wasn't checkpointed yet. -res = assert.commandWorked(db.runCommand({validate: collName, background: true})); -assert.eq(true, res.valid); -assert.eq(1, res.nIndexes); - -forceCheckpoint(); - -// Validating after the checkpoint should validate the newly created index. -res = assert.commandWorked(db.runCommand({validate: collName, background: true})); -assert.eq(true, res.valid); -assert.eq(2, res.nIndexes); -}()); |