diff options
author | Blake Oler <blake.oler@mongodb.com> | 2018-02-14 11:46:22 -0500 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2018-02-21 12:27:14 -0500 |
commit | e126c24bdc87b79fb98905625c8c1c5b424679e6 (patch) | |
tree | f3b1cb343d2e6e69cae92cac9556f61955148a2d /jstests | |
parent | 788369eb773eede21ee0f492363bb7e64054ffd3 (diff) | |
download | mongo-e126c24bdc87b79fb98905625c8c1c5b424679e6.tar.gz |
SERVER-33195 create a movePrimary command for shards and _configsvrCommitMovePrimary command for config servers
Diffstat (limited to 'jstests')
5 files changed, 10 insertions, 4 deletions
diff --git a/jstests/core/views/views_all_commands.js b/jstests/core/views/views_all_commands.js index 03ff638550c..696e72fff80 100644 --- a/jstests/core/views/views_all_commands.js +++ b/jstests/core/views/views_all_commands.js @@ -69,6 +69,7 @@ _configsvrCommitChunkMerge: {skip: isAnInternalCommand}, _configsvrCommitChunkMigration: {skip: isAnInternalCommand}, _configsvrCommitChunkSplit: {skip: isAnInternalCommand}, + _configsvrCommitMovePrimary: {skip: isAnInternalCommand}, _configsvrCreateCollection: {skip: isAnInternalCommand}, _configsvrCreateDatabase: {skip: isAnInternalCommand}, _configsvrDropCollection: {skip: isAnInternalCommand}, @@ -87,6 +88,7 @@ _isSelf: {skip: isAnInternalCommand}, _mergeAuthzCollections: {skip: isAnInternalCommand}, _migrateClone: {skip: isAnInternalCommand}, + _movePrimary: {skip: isAnInternalCommand}, _recvChunkAbort: {skip: isAnInternalCommand}, _recvChunkCommit: {skip: isAnInternalCommand}, _recvChunkStart: {skip: isAnInternalCommand}, diff --git a/jstests/sharding/move_primary_basic.js b/jstests/sharding/move_primary_basic.js index ab4fa9e4761..e2e609fc866 100644 --- a/jstests/sharding/move_primary_basic.js +++ b/jstests/sharding/move_primary_basic.js @@ -18,10 +18,8 @@ st.ensurePrimaryShard(kDbName, shard0); assert.eq(shard0, mongos.getDB('config').databases.findOne({_id: kDbName}).primary); - // Can run only on mongos. - assert.commandFailedWithCode( - st.d0.getDB('admin').runCommand({movePrimary: kDbName, to: shard0}), - ErrorCodes.CommandNotFound); + // Can run on shards. + assert.commandWorked(st.d0.getDB('admin').runCommand({_movePrimary: kDbName, to: shard1})); // Can run only against the admin database. assert.commandFailedWithCode( diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js index ed39354fb7c..35c794950d2 100644 --- a/jstests/sharding/safe_secondary_reads_drop_recreate.js +++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js @@ -65,6 +65,7 @@ _configsvrCommitChunkMerge: {skip: "primary only"}, _configsvrCommitChunkMigration: {skip: "primary only"}, _configsvrCommitChunkSplit: {skip: "primary only"}, + _configsvrCommitMovePrimary: {skip: "primary only"}, _configsvrDropCollection: {skip: "primary only"}, _configsvrDropDatabase: {skip: "primary only"}, _configsvrMoveChunk: {skip: "primary only"}, @@ -78,6 +79,7 @@ _isSelf: {skip: "does not return user data"}, _mergeAuthzCollections: {skip: "primary only"}, _migrateClone: {skip: "primary only"}, + _movePrimary: {skip: "primary only"}, _recvChunkAbort: {skip: "primary only"}, _recvChunkCommit: {skip: "primary only"}, _recvChunkStart: {skip: "primary only"}, 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 a4ddc2b505a..06a9f152a52 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 @@ -72,6 +72,7 @@ _configsvrCommitChunkMerge: {skip: "primary only"}, _configsvrCommitChunkMigration: {skip: "primary only"}, _configsvrCommitChunkSplit: {skip: "primary only"}, + _configsvrCommitMovePrimary: {skip: "primary only"}, _configsvrDropCollection: {skip: "primary only"}, _configsvrDropDatabase: {skip: "primary only"}, _configsvrMoveChunk: {skip: "primary only"}, @@ -85,6 +86,7 @@ _isSelf: {skip: "does not return user data"}, _mergeAuthzCollections: {skip: "primary only"}, _migrateClone: {skip: "primary only"}, + _movePrimary: {skip: "primary only"}, _recvChunkAbort: {skip: "primary only"}, _recvChunkCommit: {skip: "primary only"}, _recvChunkStart: {skip: "primary only"}, diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js index 03c65bc9b03..fab93b32a9f 100644 --- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js +++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js @@ -65,6 +65,7 @@ _configsvrCommitChunkMerge: {skip: "primary only"}, _configsvrCommitChunkMigration: {skip: "primary only"}, _configsvrCommitChunkSplit: {skip: "primary only"}, + _configsvrCommitMovePrimary: {skip: "primary only"}, _configsvrDropCollection: {skip: "primary only"}, _configsvrDropDatabase: {skip: "primary only"}, _configsvrMoveChunk: {skip: "primary only"}, @@ -78,6 +79,7 @@ _isSelf: {skip: "does not return user data"}, _mergeAuthzCollections: {skip: "primary only"}, _migrateClone: {skip: "primary only"}, + _movePrimary: {skip: "primary only"}, _recvChunkAbort: {skip: "primary only"}, _recvChunkCommit: {skip: "primary only"}, _recvChunkStart: {skip: "primary only"}, |