diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-01-23 10:48:15 -0500 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-01-24 22:37:20 -0500 |
commit | ec4520d72b2a4ff6ba980e913c988b11e7d188a4 (patch) | |
tree | 97cabc080446860c2d785011ed256f6a6335e5d4 /jstests | |
parent | 5fb83f78b6740dbe3a771735e3629fec2a854a1d (diff) | |
download | mongo-ec4520d72b2a4ff6ba980e913c988b11e7d188a4.tar.gz |
SERVER-38506 Create a cluster setIndexCommitQuorum command to parallel createIndexes
Diffstat (limited to 'jstests')
5 files changed, 22 insertions, 1 deletions
diff --git a/jstests/sharding/database_and_shard_versioning_all_commands.js b/jstests/sharding/database_and_shard_versioning_all_commands.js index 3f09d715465..c504455fe88 100644 --- a/jstests/sharding/database_and_shard_versioning_all_commands.js +++ b/jstests/sharding/database_and_shard_versioning_all_commands.js @@ -386,6 +386,23 @@ saslContinue: {skip: "not on a user database"}, saslStart: {skip: "not on a user database"}, serverStatus: {skip: "executes locally on mongos (not sent to any remote node)"}, + setIndexCommitQuorum: { + skipProfilerCheck: true, + sendsDbVersion: false, + sendsShardVersion: true, + setUp: function(mongosConn) { + // Expects the collection to exist, and doesn't implicitly create it. + assert.commandWorked(mongosConn.getDB(dbName).runCommand({create: collName})); + }, + command: { + setIndexCommitQuorum: collName, + indexNames: ["index"], + commitQuorum: {w: "majority"} + }, + cleanUp: function(mongosConn) { + assert(mongosConn.getDB(dbName).getCollection(collName).drop()); + }, + }, setFeatureCompatibilityVersion: {skip: "not on a user database"}, setFreeMonitoring: {skip: "explicitly fails for mongos, primary mongod only", conditional: true}, diff --git a/jstests/sharding/libs/last_stable_mongos_commands.js b/jstests/sharding/libs/last_stable_mongos_commands.js index 6072600450a..fdd1bc0fa4a 100644 --- a/jstests/sharding/libs/last_stable_mongos_commands.js +++ b/jstests/sharding/libs/last_stable_mongos_commands.js @@ -15,4 +15,5 @@ const commandsRemovedFromMongosIn42 = [ // These commands were added in mongos 4.2, so will not appear in the listCommands output of a 4.0 // mongos. We will allow these commands to have a test defined without always existing on the mongos // being used. -const commandsAddedToMongosIn42 = ['abortTransaction', 'commitTransaction', 'dropConnections']; +const commandsAddedToMongosIn42 = + ['abortTransaction', 'commitTransaction', 'dropConnections', 'setIndexCommitQuorum']; diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js index e1b8d9ac9b4..e54deea9f30 100644 --- a/jstests/sharding/safe_secondary_reads_drop_recreate.js +++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js @@ -275,6 +275,7 @@ saslStart: {skip: "primary only"}, serverStatus: {skip: "does not return user data"}, setCommittedSnapshot: {skip: "does not return user data"}, + setIndexCommitQuorum: {skip: "primary only"}, setFeatureCompatibilityVersion: {skip: "primary only"}, setFreeMonitoring: {skip: "primary only"}, setParameter: {skip: "does not return user data"}, diff --git a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js index 17cc9489abf..2941787dc71 100644 --- a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js +++ b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js @@ -310,6 +310,7 @@ saslStart: {skip: "primary only"}, serverStatus: {skip: "does not return user data"}, setCommittedSnapshot: {skip: "does not return user data"}, + setIndexCommitQuorum: {skip: "primary only"}, setFeatureCompatibilityVersion: {skip: "primary only"}, setFreeMonitoring: {skip: "primary only"}, setParameter: {skip: "does not return user data"}, diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js index 985c84b6aea..e3be4c90f7c 100644 --- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js +++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js @@ -280,6 +280,7 @@ saslStart: {skip: "primary only"}, serverStatus: {skip: "does not return user data"}, setCommittedSnapshot: {skip: "does not return user data"}, + setIndexCommitQuorum: {skip: "primary only"}, setFeatureCompatibilityVersion: {skip: "primary only"}, setFreeMonitoring: {skip: "primary only"}, setParameter: {skip: "does not return user data"}, |