summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer Jackson <spencer.jackson@mongodb.com>2022-09-13 15:51:30 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-05 18:10:10 +0000
commitac1111d677d6fd5fd662bd13bc6f356a7bfa7356 (patch)
tree9fa7a3de23ab10ead1fbe39786e6f5941eaaccbf
parentacab83f1479eaea3b75fe03f2ed9f92f980e6f3a (diff)
downloadmongo-ac1111d677d6fd5fd662bd13bc6f356a7bfa7356.tar.gz
SERVER-69348 Remove repairDatabase command
(cherry picked from commit fa534d676f5f673a6a7f3ea656f650ff108b7f92)
-rw-r--r--etc/backports_required_for_multiversion_tests.yml16
-rw-r--r--jstests/core/views/views_all_commands.js1
-rw-r--r--jstests/replsets/db_reads_while_recovering_all_commands.js1
-rw-r--r--jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js1
-rw-r--r--jstests/sharding/read_write_concern_defaults_application.js1
-rw-r--r--src/mongo/db/commands/dbcommands.cpp37
-rw-r--r--src/mongo/db/dbcommands.idl11
-rw-r--r--src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp1
8 files changed, 16 insertions, 53 deletions
diff --git a/etc/backports_required_for_multiversion_tests.yml b/etc/backports_required_for_multiversion_tests.yml
index 6cc1e5a286d..3655ccfc4ce 100644
--- a/etc/backports_required_for_multiversion_tests.yml
+++ b/etc/backports_required_for_multiversion_tests.yml
@@ -284,6 +284,14 @@ last-continuous:
test_file: jstests/sharding/append_oplog_note_mongos.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/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:
@@ -701,6 +709,14 @@ last-lts:
test_file: jstests/sharding/append_oplog_note_mongos.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/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 9b8fb5a9972..cfaec7fece6 100644
--- a/jstests/core/views/views_all_commands.js
+++ b/jstests/core/views/views_all_commands.js
@@ -550,7 +550,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 4f3d4832433..4c7efbfe269 100644
--- a/jstests/replsets/db_reads_while_recovering_all_commands.js
+++ b/jstests/replsets/db_reads_while_recovering_all_commands.js
@@ -317,7 +317,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 b2f06cacb02..4e140b44224 100644
--- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js
+++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js
@@ -711,7 +711,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 983f97eaacf..812fccd4bcc 100644
--- a/jstests/sharding/read_write_concern_defaults_application.js
+++ b/jstests/sharding/read_write_concern_defaults_application.js
@@ -612,7 +612,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 b19eb539ba3..d407446fb3e 100644
--- a/src/mongo/db/commands/dbcommands.cpp
+++ b/src/mongo/db/commands/dbcommands.cpp
@@ -171,43 +171,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 9717c066b3d..5f4d3020245 100644
--- a/src/mongo/db/dbcommands.idl
+++ b/src/mongo/db/dbcommands.idl
@@ -212,14 +212,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",