summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/repl_set_commands.cpp
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2018-04-10 16:20:53 -0400
committerHenrik Edin <henrik.edin@mongodb.com>2018-04-18 08:34:36 -0400
commitda019f4197df2abfec336c5063e674980307ff93 (patch)
tree70d5504a95ea51710a92fe3cb210f6866fe4ae04 /src/mongo/db/repl/repl_set_commands.cpp
parent980e650068c23c762c3662216277fad576a7e7f4 (diff)
downloadmongo-da019f4197df2abfec336c5063e674980307ff93.tar.gz
SERVER-29725 mongoe application
Embedded MongoDB in a standalone application. To be able to connect with the shell and perform testing on embedded.
Diffstat (limited to 'src/mongo/db/repl/repl_set_commands.cpp')
-rw-r--r--src/mongo/db/repl/repl_set_commands.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/mongo/db/repl/repl_set_commands.cpp b/src/mongo/db/repl/repl_set_commands.cpp
index 8b6cc7dd2e2..d96486aa7d5 100644
--- a/src/mongo/db/repl/repl_set_commands.cpp
+++ b/src/mongo/db/repl/repl_set_commands.cpp
@@ -176,47 +176,6 @@ public:
}
} cmdReplSetRBID;
-class CmdReplSetGetStatus : public ReplSetCommand {
-public:
- std::string help() const override {
- return "Report status of a replica set from the POV of this server\n"
- "{ replSetGetStatus : 1 }\n"
- "http://dochub.mongodb.org/core/replicasetcommands";
- }
- CmdReplSetGetStatus() : ReplSetCommand("replSetGetStatus") {}
- virtual bool run(OperationContext* opCtx,
- const string&,
- const BSONObj& cmdObj,
- BSONObjBuilder& result) {
- if (cmdObj["forShell"].trueValue())
- LastError::get(opCtx->getClient()).disable();
-
- Status status = ReplicationCoordinator::get(opCtx)->checkReplEnabledForCommand(&result);
- if (!status.isOK())
- return CommandHelpers::appendCommandStatus(result, status);
-
- bool includeInitialSync = false;
- Status initialSyncStatus =
- bsonExtractBooleanFieldWithDefault(cmdObj, "initialSync", false, &includeInitialSync);
- if (!initialSyncStatus.isOK()) {
- return CommandHelpers::appendCommandStatus(result, initialSyncStatus);
- }
-
- auto responseStyle = ReplicationCoordinator::ReplSetGetStatusResponseStyle::kBasic;
- if (includeInitialSync) {
- responseStyle = ReplicationCoordinator::ReplSetGetStatusResponseStyle::kInitialSync;
- }
- status =
- ReplicationCoordinator::get(opCtx)->processReplSetGetStatus(&result, responseStyle);
- return CommandHelpers::appendCommandStatus(result, status);
- }
-
-private:
- ActionSet getAuthActionSet() const override {
- return ActionSet{ActionType::replSetGetStatus};
- }
-} cmdReplSetGetStatus;
-
class CmdReplSetGetConfig : public ReplSetCommand {
public:
std::string help() const override {