summaryrefslogtreecommitdiff
path: root/src
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 /src
parentacab83f1479eaea3b75fe03f2ed9f92f980e6f3a (diff)
downloadmongo-ac1111d677d6fd5fd662bd13bc6f356a7bfa7356.tar.gz
SERVER-69348 Remove repairDatabase command
(cherry picked from commit fa534d676f5f673a6a7f3ea656f650ff108b7f92)
Diffstat (limited to 'src')
-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
3 files changed, 0 insertions, 49 deletions
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",