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-10-07 17:54:45 +0000 |
commit | ea65e3babfd1341b504b10cf767f6688fc3b45b3 (patch) | |
tree | 7de1564785061a0d5c284d754e3490da8102e8b5 | |
parent | 83de4afb15a616fb8f40bf329ae17b65ae2c130a (diff) | |
download | mongo-ea65e3babfd1341b504b10cf767f6688fc3b45b3.tar.gz |
SERVER-69348 Remove repairDatabase command
(cherry picked from commit fa534d676f5f673a6a7f3ea656f650ff108b7f92)
(cherry picked from commit 49297c3cb0cdae29b0c1da41c6ea802731090a24)
6 files changed, 12 insertions, 39 deletions
diff --git a/etc/backports_required_for_multiversion_tests.yml b/etc/backports_required_for_multiversion_tests.yml index 7212d6c5c7d..5146849476f 100644 --- a/etc/backports_required_for_multiversion_tests.yml +++ b/etc/backports_required_for_multiversion_tests.yml @@ -116,6 +116,12 @@ last-continuous: test_file: jstests/sharding/refine_collection_shard_key_basic.js - ticket: SERVER-68115 test_file: jstests/core/elemmatch_index.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/sharding/read_write_concern_defaults_application.js # Tests that should only be excluded from particular suites should be listed under that suite. suites: @@ -392,6 +398,12 @@ last-lts: test_file: jstests/sharding/refine_collection_shard_key_basic.js - ticket: SERVER-68115 test_file: jstests/core/elemmatch_index.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/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 a92902e4676..a6c67472405 100644 --- a/jstests/core/views/views_all_commands.js +++ b/jstests/core/views/views_all_commands.js @@ -495,7 +495,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 4ef25c51e5b..b39a1542f29 100644 --- a/jstests/replsets/db_reads_while_recovering_all_commands.js +++ b/jstests/replsets/db_reads_while_recovering_all_commands.js @@ -279,7 +279,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/sharding/read_write_concern_defaults_application.js b/jstests/sharding/read_write_concern_defaults_application.js index 54f853697e2..5949f0fd5d0 100644 --- a/jstests/sharding/read_write_concern_defaults_application.js +++ b/jstests/sharding/read_write_concern_defaults_application.js @@ -550,7 +550,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 5bdab6c4127..5b25d027d7f 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -254,41 +254,6 @@ public: }; } cmdDropDatabase; -static const char* repairRemovedMessage = - "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"; - -class CmdRepairDatabase : public ErrmsgCommandDeprecated { -public: - AllowedOnSecondary secondaryAllowed(ServiceContext*) const override { - return AllowedOnSecondary::kAlways; - } - virtual bool maintenanceMode() const { - return false; - } - - std::string help() const override { - return repairRemovedMessage; - } - virtual bool supportsWriteConcern(const BSONObj& cmd) const override { - return false; - } - - CmdRepairDatabase() : ErrmsgCommandDeprecated("repairDatabase") {} - - bool errmsgRun(OperationContext* opCtx, - const std::string& dbname, - const BSONObj& cmdObj, - std::string& errmsg, - BSONObjBuilder& result) { - - uasserted(ErrorCodes::CommandNotFound, repairRemovedMessage); - return false; - } -} cmdRepairDatabase; - /* drop collection */ class CmdDrop : public DropCmdVersion1Gen<CmdDrop> { public: diff --git a/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp b/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp index 955fbf62fff..1a2810356a2 100644 --- a/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp +++ b/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp @@ -602,7 +602,6 @@ TEST_F(MongodbCAPITest, RunListCommands) { "refreshLogicalSessionCacheNow", "refreshSessions", "renameCollection", - "repairDatabase", "serverStatus", "setParameter", "sleep", |