diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2022-09-13 15:51:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-13 19:06:26 +0000 |
commit | fa534d676f5f673a6a7f3ea656f650ff108b7f92 (patch) | |
tree | 44afb7b2a94ddca550e4d05369c5bc60696c6ec9 | |
parent | 85ec8439047fae7c337501987a38ef97a7596e0f (diff) | |
download | mongo-fa534d676f5f673a6a7f3ea656f650ff108b7f92.tar.gz |
SERVER-69348 Remove repairDatabase command
8 files changed, 17 insertions, 54 deletions
diff --git a/etc/backports_required_for_multiversion_tests.yml b/etc/backports_required_for_multiversion_tests.yml index ef7762e46c4..597c6c4e4ac 100644 --- a/etc/backports_required_for_multiversion_tests.yml +++ b/etc/backports_required_for_multiversion_tests.yml @@ -290,6 +290,15 @@ last-continuous: test_file: jstests/core/txns/txn_ops_allowed_on_buckets_coll.js - ticket: SERVER-68556 test_file: jstests/core/txns/no_writes_to_system_collections_in_txn.js + - ticket: SERVER-69348 + test_file: jstests/core/views/views_all_commands.js + - ticket: SERVER-69348 + test_file: jstests/replsets/db_reads_while_recovering_all_commands.js + - ticket: SERVER-69348 + test_file: jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js + - ticket: SERVER-69348 + test_file: jstests/sharding/read_write_concern_defaults_application.js + # Tests that should only be excluded from particular suites should be listed under that suite. suites: @@ -713,7 +722,14 @@ last-lts: test_file: jstests/core/txns/txn_ops_allowed_on_buckets_coll.js - ticket: SERVER-68556 test_file: jstests/core/txns/no_writes_to_system_collections_in_txn.js - + - ticket: SERVER-69348 + test_file: jstests/core/views/views_all_commands.js + - ticket: SERVER-69348 + test_file: jstests/replsets/db_reads_while_recovering_all_commands.js + - ticket: SERVER-69348 + test_file: jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js + - ticket: SERVER-69348 + test_file: jstests/sharding/read_write_concern_defaults_application.js # Tests that should only be excluded from particular suites should be listed under that suite. suites: diff --git a/jstests/core/views/views_all_commands.js b/jstests/core/views/views_all_commands.js index fdff42d6601..b912d157314 100644 --- a/jstests/core/views/views_all_commands.js +++ b/jstests/core/views/views_all_commands.js @@ -555,7 +555,6 @@ let viewsCommandTests = { skipSharded: true, } ], - repairDatabase: {skip: isUnrelated}, repairShardedCollectionChunksHistory: { command: {repairShardedCollectionChunksHistory: "test.view"}, skipStandalone: true, diff --git a/jstests/replsets/db_reads_while_recovering_all_commands.js b/jstests/replsets/db_reads_while_recovering_all_commands.js index e041d987219..2614dcf008f 100644 --- a/jstests/replsets/db_reads_while_recovering_all_commands.js +++ b/jstests/replsets/db_reads_while_recovering_all_commands.js @@ -328,7 +328,6 @@ const allCommands = { refreshSessions: {skip: isNotAUserDataRead}, reIndex: {skip: isNotAUserDataRead}, renameCollection: {skip: isPrimaryOnly}, - repairDatabase: {skip: isNotAUserDataRead}, repairShardedCollectionChunksHistory: {skip: isPrimaryOnly}, replSetAbortPrimaryCatchUp: {skip: isNotAUserDataRead}, replSetFreeze: {skip: isNotAUserDataRead}, diff --git a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js index 6254e552f2a..851c3bad41d 100644 --- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js +++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js @@ -709,7 +709,6 @@ TenantMigrationConcurrentWriteUtil.testCases = { assert(!collectionExists(db, collName + "Renamed")); } }, - repairDatabase: {skip: isDeprecated}, replSetAbortPrimaryCatchUp: {skip: isNotRunOnUserDatabase}, replSetFreeze: {skip: isNotRunOnUserDatabase}, replSetGetConfig: {skip: isNotRunOnUserDatabase}, diff --git a/jstests/sharding/read_write_concern_defaults_application.js b/jstests/sharding/read_write_concern_defaults_application.js index ef3a952bc35..bdfb865b297 100644 --- a/jstests/sharding/read_write_concern_defaults_application.js +++ b/jstests/sharding/read_write_concern_defaults_application.js @@ -606,7 +606,6 @@ let testCases = { checkReadConcern: false, checkWriteConcern: true, }, - repairDatabase: {skip: "does not accept read or write concern"}, repairShardedCollectionChunksHistory: {skip: "does not accept read or write concern"}, replSetAbortPrimaryCatchUp: {skip: "does not accept read or write concern"}, replSetFreeze: {skip: "does not accept read or write concern"}, diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index 851004bbd28..d18fa21101f 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -173,43 +173,6 @@ public: }; } cmdDropDatabase; -class CmdRepairDatabase final : public TypedCommand<CmdRepairDatabase> { -public: - using Request = RepairDatabaseCommand; - - class Invocation final : public InvocationBase { - public: - using InvocationBase::InvocationBase; - - bool supportsWriteConcern() const final { - return false; - } - - NamespaceString ns() const final { - return NamespaceString(request().getDbName()); - } - - void doCheckAuthorization(OperationContext* opCtx) const final {} - - void typedRun(OperationContext*) { - uasserted(ErrorCodes::CommandNotFound, Request::kCommandDescription); - } - }; - - std::string help() const final { - return Request::kCommandDescription.toString(); - } - - AllowedOnSecondary secondaryAllowed(ServiceContext*) const final { - return AllowedOnSecondary::kAlways; - } - - bool maintenanceMode() const final { - return false; - } - -} cmdRepairDatabase; - /* drop collection */ class CmdDrop : public DropCmdVersion1Gen<CmdDrop> { public: diff --git a/src/mongo/db/dbcommands.idl b/src/mongo/db/dbcommands.idl index 51df0e963fe..82b476b1555 100644 --- a/src/mongo/db/dbcommands.idl +++ b/src/mongo/db/dbcommands.idl @@ -214,14 +214,3 @@ commands: description: Include additional stats about allocated but unused space. type: safeBool default: false - - repairDatabase: - description: |- - This command has been removed. If you would like to compact your data, use the 'compact' command. - If you would like to rebuild indexes, use the 'reIndex' command. - If you need to recover data, please see the documentation for repairing your database offline: - http://dochub.mongodb.org/core/repair - command_name: repairDatabase - cpp_name: RepairDatabaseCommand - api_version: '' - namespace: ignored diff --git a/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp b/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp index d094003f515..b7d15792fc4 100644 --- a/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp +++ b/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp @@ -606,7 +606,6 @@ TEST_F(MongodbCAPITest, RunListCommands) { "refreshLogicalSessionCacheNow", "refreshSessions", "renameCollection", - "repairDatabase", "serverStatus", "setParameter", "sleep", |