summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2016-03-15 14:45:23 -0400
committerMisha Tyulenev <misha@mongodb.com>2016-03-15 14:47:13 -0400
commit6f684e82c6d0aa1d1cef98f48dcae41010666a9a (patch)
treeefd384590f253241bb577b3ff8c76d0834054bea /src/mongo/db/commands
parent652e3577be3d157cec039d0b017cf7e2d6e2c7c6 (diff)
downloadmongo-6f684e82c6d0aa1d1cef98f48dcae41010666a9a.tar.gz
SERVER-23024 remove isWriteCommandForConfigServer method
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/apply_ops.cpp3
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp6
-rw-r--r--src/mongo/db/commands/authentication_commands.h3
-rw-r--r--src/mongo/db/commands/clone.cpp3
-rw-r--r--src/mongo/db/commands/clone_collection.cpp3
-rw-r--r--src/mongo/db/commands/collection_to_capped.cpp6
-rw-r--r--src/mongo/db/commands/compact.cpp3
-rw-r--r--src/mongo/db/commands/conn_pool_stats.cpp3
-rw-r--r--src/mongo/db/commands/conn_pool_sync.cpp3
-rw-r--r--src/mongo/db/commands/connection_status.cpp3
-rw-r--r--src/mongo/db/commands/copydb.cpp3
-rw-r--r--src/mongo/db/commands/copydb_start_commands.cpp6
-rw-r--r--src/mongo/db/commands/count_cmd.cpp3
-rw-r--r--src/mongo/db/commands/cpuprofile.cpp3
-rw-r--r--src/mongo/db/commands/create_indexes.cpp3
-rw-r--r--src/mongo/db/commands/current_op.cpp3
-rw-r--r--src/mongo/db/commands/dbhash.h3
-rw-r--r--src/mongo/db/commands/distinct.cpp3
-rw-r--r--src/mongo/db/commands/drop_indexes.cpp6
-rw-r--r--src/mongo/db/commands/explain_cmd.cpp3
-rw-r--r--src/mongo/db/commands/fail_point_cmd.cpp3
-rw-r--r--src/mongo/db/commands/find_and_modify.cpp3
-rw-r--r--src/mongo/db/commands/find_cmd.cpp3
-rw-r--r--src/mongo/db/commands/fsync.cpp6
-rw-r--r--src/mongo/db/commands/generic.cpp27
-rw-r--r--src/mongo/db/commands/geo_near_cmd.cpp3
-rw-r--r--src/mongo/db/commands/get_last_error.cpp9
-rw-r--r--src/mongo/db/commands/getmore_cmd.cpp3
-rw-r--r--src/mongo/db/commands/group_cmd.cpp4
-rw-r--r--src/mongo/db/commands/hashcmd.cpp3
-rw-r--r--src/mongo/db/commands/index_filter_commands.cpp3
-rw-r--r--src/mongo/db/commands/index_filter_commands.h2
-rw-r--r--src/mongo/db/commands/isself.cpp3
-rw-r--r--src/mongo/db/commands/kill_op.cpp3
-rw-r--r--src/mongo/db/commands/killcursors_common.h3
-rw-r--r--src/mongo/db/commands/list_collections.cpp3
-rw-r--r--src/mongo/db/commands/list_databases.cpp3
-rw-r--r--src/mongo/db/commands/list_indexes.cpp3
-rw-r--r--src/mongo/db/commands/mr.cpp6
-rw-r--r--src/mongo/db/commands/oplog_note.cpp3
-rw-r--r--src/mongo/db/commands/parallel_collection_scan.cpp3
-rw-r--r--src/mongo/db/commands/parameters.cpp6
-rw-r--r--src/mongo/db/commands/pipeline_command.cpp3
-rw-r--r--src/mongo/db/commands/plan_cache_commands.cpp3
-rw-r--r--src/mongo/db/commands/plan_cache_commands.h2
-rw-r--r--src/mongo/db/commands/rename_collection.cpp3
-rw-r--r--src/mongo/db/commands/repair_cursor.cpp3
-rw-r--r--src/mongo/db/commands/server_status.cpp3
-rw-r--r--src/mongo/db/commands/shutdown.h3
-rw-r--r--src/mongo/db/commands/snapshot_management.cpp6
-rw-r--r--src/mongo/db/commands/test_commands.cpp13
-rw-r--r--src/mongo/db/commands/top_command.cpp3
-rw-r--r--src/mongo/db/commands/touch.cpp3
-rw-r--r--src/mongo/db/commands/user_management_commands.cpp60
-rw-r--r--src/mongo/db/commands/validate.cpp3
-rw-r--r--src/mongo/db/commands/write_commands/write_commands.cpp3
-rw-r--r--src/mongo/db/commands/write_commands/write_commands.h2
-rw-r--r--src/mongo/db/commands/writeback_compatibility_shim.cpp3
58 files changed, 0 insertions, 293 deletions
diff --git a/src/mongo/db/commands/apply_ops.cpp b/src/mongo/db/commands/apply_ops.cpp
index 12dc70ceb86..4b5e53e5225 100644
--- a/src/mongo/db/commands/apply_ops.cpp
+++ b/src/mongo/db/commands/apply_ops.cpp
@@ -69,9 +69,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
ApplyOpsCmd() : Command("applyOps") {}
virtual void help(stringstream& help) const {
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 03759d1302e..b30a7694417 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -105,9 +105,6 @@ public:
void help(stringstream& h) const {
h << "internal";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
@@ -363,9 +360,6 @@ public:
void help(stringstream& h) const {
h << "de-authenticate";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
CmdLogout() : Command("logout") {}
bool run(OperationContext* txn,
const string& dbname,
diff --git a/src/mongo/db/commands/authentication_commands.h b/src/mongo/db/commands/authentication_commands.h
index 0831a62ac82..d11ae5bc536 100644
--- a/src/mongo/db/commands/authentication_commands.h
+++ b/src/mongo/db/commands/authentication_commands.h
@@ -43,9 +43,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(std::stringstream& ss) const {
ss << "internal";
}
diff --git a/src/mongo/db/commands/clone.cpp b/src/mongo/db/commands/clone.cpp
index b5632dd44d7..499b8827a76 100644
--- a/src/mongo/db/commands/clone.cpp
+++ b/src/mongo/db/commands/clone.cpp
@@ -59,9 +59,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& help) const {
help << "clone this database from an instance of the db on another host\n";
diff --git a/src/mongo/db/commands/clone_collection.cpp b/src/mongo/db/commands/clone_collection.cpp
index dbbe117f97d..efd3500d395 100644
--- a/src/mongo/db/commands/clone_collection.cpp
+++ b/src/mongo/db/commands/clone_collection.cpp
@@ -70,9 +70,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const {
return parseNsFullyQualified(dbname, cmdObj);
diff --git a/src/mongo/db/commands/collection_to_capped.cpp b/src/mongo/db/commands/collection_to_capped.cpp
index f73d20a59e1..a0b283ebc49 100644
--- a/src/mongo/db/commands/collection_to_capped.cpp
+++ b/src/mongo/db/commands/collection_to_capped.cpp
@@ -56,9 +56,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& help) const {
help << "{ cloneCollectionAsCapped:<fromName>, toCollection:<toName>, size:<sizeInBytes> }";
}
@@ -132,9 +129,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& help) const {
help << "{ convertToCapped:<fromCollectionName>, size:<sizeInBytes> }";
}
diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp
index 01f2eb607e1..cff4a4c359b 100644
--- a/src/mongo/db/commands/compact.cpp
+++ b/src/mongo/db/commands/compact.cpp
@@ -56,9 +56,6 @@ using std::stringstream;
class CompactCmd : public Command {
public:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return false;
}
diff --git a/src/mongo/db/commands/conn_pool_stats.cpp b/src/mongo/db/commands/conn_pool_stats.cpp
index 39d27c1200e..ffd0945ed3f 100644
--- a/src/mongo/db/commands/conn_pool_stats.cpp
+++ b/src/mongo/db/commands/conn_pool_stats.cpp
@@ -52,9 +52,6 @@ public:
help << "stats about connections between servers in a replica set or sharded cluster.";
}
- bool isWriteCommandForConfigServer() const override {
- return false;
- }
void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
diff --git a/src/mongo/db/commands/conn_pool_sync.cpp b/src/mongo/db/commands/conn_pool_sync.cpp
index e84c418761b..839e3a045b4 100644
--- a/src/mongo/db/commands/conn_pool_sync.cpp
+++ b/src/mongo/db/commands/conn_pool_sync.cpp
@@ -43,9 +43,6 @@ public:
virtual void help(std::stringstream& help) const {
help << "internal";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {
diff --git a/src/mongo/db/commands/connection_status.cpp b/src/mongo/db/commands/connection_status.cpp
index 843b8b1728a..340bc032cdb 100644
--- a/src/mongo/db/commands/connection_status.cpp
+++ b/src/mongo/db/commands/connection_status.cpp
@@ -44,9 +44,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
diff --git a/src/mongo/db/commands/copydb.cpp b/src/mongo/db/commands/copydb.cpp
index c53dd86f8f9..75d5aa4e6dd 100644
--- a/src/mongo/db/commands/copydb.cpp
+++ b/src/mongo/db/commands/copydb.cpp
@@ -98,9 +98,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual Status checkAuthForCommand(ClientBasic* client,
const std::string& dbname,
diff --git a/src/mongo/db/commands/copydb_start_commands.cpp b/src/mongo/db/commands/copydb_start_commands.cpp
index 078ddca6039..95d5c9499fe 100644
--- a/src/mongo/db/commands/copydb_start_commands.cpp
+++ b/src/mongo/db/commands/copydb_start_commands.cpp
@@ -78,9 +78,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
@@ -150,9 +147,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual Status checkAuthForCommand(ClientBasic* client,
const std::string& dbname,
diff --git a/src/mongo/db/commands/count_cmd.cpp b/src/mongo/db/commands/count_cmd.cpp
index f22b573d65d..c292f27c40c 100644
--- a/src/mongo/db/commands/count_cmd.cpp
+++ b/src/mongo/db/commands/count_cmd.cpp
@@ -54,9 +54,6 @@ using std::stringstream;
*/
class CmdCount : public Command {
public:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
CmdCount() : Command("count") {}
virtual bool slaveOk() const {
// ok on --slave setups
diff --git a/src/mongo/db/commands/cpuprofile.cpp b/src/mongo/db/commands/cpuprofile.cpp
index 10be4af8978..2706d44510b 100644
--- a/src/mongo/db/commands/cpuprofile.cpp
+++ b/src/mongo/db/commands/cpuprofile.cpp
@@ -91,9 +91,6 @@ public:
// This is an abuse of the global dbmutex. We only really need to
// ensure that only one cpuprofiler command runs at once; it would
// be fine for it to run concurrently with other operations.
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
};
/**
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp
index bf560e1cb8d..4ee3e3af167 100644
--- a/src/mongo/db/commands/create_indexes.cpp
+++ b/src/mongo/db/commands/create_indexes.cpp
@@ -64,9 +64,6 @@ class CmdCreateIndex : public Command {
public:
CmdCreateIndex() : Command("createIndexes") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return false;
} // TODO: this could be made true...
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp
index f15f60807e7..680a99ced73 100644
--- a/src/mongo/db/commands/current_op.cpp
+++ b/src/mongo/db/commands/current_op.cpp
@@ -53,9 +53,6 @@ class CurrentOpCommand : public Command {
public:
CurrentOpCommand() : Command("currentOp") {}
- bool isWriteCommandForConfigServer() const final {
- return false;
- }
bool slaveOk() const final {
return true;
diff --git a/src/mongo/db/commands/dbhash.h b/src/mongo/db/commands/dbhash.h
index 8fc964b6b12..d496832f15a 100644
--- a/src/mongo/db/commands/dbhash.h
+++ b/src/mongo/db/commands/dbhash.h
@@ -46,9 +46,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out);
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp
index 425e888f8ec..c03f6382fe0 100644
--- a/src/mongo/db/commands/distinct.cpp
+++ b/src/mongo/db/commands/distinct.cpp
@@ -75,9 +75,6 @@ public:
virtual bool slaveOverrideOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
bool supportsReadConcern() const final {
return true;
}
diff --git a/src/mongo/db/commands/drop_indexes.cpp b/src/mongo/db/commands/drop_indexes.cpp
index 96757af0834..cead3ea45c7 100644
--- a/src/mongo/db/commands/drop_indexes.cpp
+++ b/src/mongo/db/commands/drop_indexes.cpp
@@ -70,9 +70,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& help) const {
help << "drop indexes for a collection";
}
@@ -102,9 +99,6 @@ public:
virtual bool slaveOk() const {
return true;
} // can reindex on a secondary
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& help) const {
help << "re-index a collection";
}
diff --git a/src/mongo/db/commands/explain_cmd.cpp b/src/mongo/db/commands/explain_cmd.cpp
index 2af6f18fed5..dc467846603 100644
--- a/src/mongo/db/commands/explain_cmd.cpp
+++ b/src/mongo/db/commands/explain_cmd.cpp
@@ -56,9 +56,6 @@ class CmdExplain : public Command {
public:
CmdExplain() : Command("explain") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
/**
* Running an explain on a secondary requires explicitly setting slaveOk.
diff --git a/src/mongo/db/commands/fail_point_cmd.cpp b/src/mongo/db/commands/fail_point_cmd.cpp
index 2b6e5cff0fc..65ca22d59e0 100644
--- a/src/mongo/db/commands/fail_point_cmd.cpp
+++ b/src/mongo/db/commands/fail_point_cmd.cpp
@@ -69,9 +69,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return true;
diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp
index 0657d640e77..c1666497b78 100644
--- a/src/mongo/db/commands/find_and_modify.cpp
+++ b/src/mongo/db/commands/find_and_modify.cpp
@@ -214,9 +214,6 @@ public:
bool slaveOk() const override {
return false;
}
- bool isWriteCommandForConfigServer() const override {
- return true;
- }
void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) override {
diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp
index 62e0a08807f..5ecc6330afb 100644
--- a/src/mongo/db/commands/find_cmd.cpp
+++ b/src/mongo/db/commands/find_cmd.cpp
@@ -73,9 +73,6 @@ class FindCmd : public Command {
public:
FindCmd() : Command("find") {}
- bool isWriteCommandForConfigServer() const override {
- return false;
- }
bool slaveOk() const override {
return false;
diff --git a/src/mongo/db/commands/fsync.cpp b/src/mongo/db/commands/fsync.cpp
index 35207dd950e..8bc028c926f 100644
--- a/src/mongo/db/commands/fsync.cpp
+++ b/src/mongo/db/commands/fsync.cpp
@@ -103,9 +103,6 @@ public:
locked = false;
pendingUnlock = false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
@@ -187,9 +184,6 @@ class FSyncUnlockCommand : public Command {
public:
FSyncUnlockCommand() : Command("fsyncUnlock") {}
- bool isWriteCommandForConfigServer() const override {
- return false;
- }
bool slaveOk() const override {
return true;
diff --git a/src/mongo/db/commands/generic.cpp b/src/mongo/db/commands/generic.cpp
index 47f47442452..26746480db6 100644
--- a/src/mongo/db/commands/generic.cpp
+++ b/src/mongo/db/commands/generic.cpp
@@ -78,9 +78,6 @@ public:
virtual bool adminOnly() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
@@ -113,9 +110,6 @@ public:
help << "a way to check that the server is alive. responds immediately even if server is "
"in a db lock.";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
@@ -139,9 +133,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
@@ -173,9 +164,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "returns information about the daemon's host";
@@ -219,9 +207,6 @@ public:
class LogRotateCmd : public Command {
public:
LogRotateCmd() : Command("logRotate") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
@@ -255,9 +240,6 @@ public:
help << "get a list of all db commands";
}
ListCommandsCmd() : Command("listCommands", false) {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
@@ -359,9 +341,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
@@ -384,9 +363,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return true;
}
@@ -454,9 +430,6 @@ public:
void help(stringstream& h) const {
h << "get argv";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return true;
}
diff --git a/src/mongo/db/commands/geo_near_cmd.cpp b/src/mongo/db/commands/geo_near_cmd.cpp
index e3b51377c9a..743329370be 100644
--- a/src/mongo/db/commands/geo_near_cmd.cpp
+++ b/src/mongo/db/commands/geo_near_cmd.cpp
@@ -63,9 +63,6 @@ class Geo2dFindNearCmd : public Command {
public:
Geo2dFindNearCmd() : Command("geoNear") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
bool slaveOk() const {
return true;
}
diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp
index e14e13d4221..ae10f85e7f9 100644
--- a/src/mongo/db/commands/get_last_error.cpp
+++ b/src/mongo/db/commands/get_last_error.cpp
@@ -56,9 +56,6 @@ using std::stringstream;
*/
class CmdResetError : public Command {
public:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
@@ -83,9 +80,6 @@ public:
class CmdGetLastError : public Command {
public:
CmdGetLastError() : Command("getLastError", false, "getlasterror") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
@@ -289,9 +283,6 @@ public:
class CmdGetPrevError : public Command {
public:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "check for errors since last reseterror commandcal";
}
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp
index 81b18386b8f..0d474ed100d 100644
--- a/src/mongo/db/commands/getmore_cmd.cpp
+++ b/src/mongo/db/commands/getmore_cmd.cpp
@@ -79,9 +79,6 @@ class GetMoreCmd : public Command {
public:
GetMoreCmd() : Command("getMore") {}
- bool isWriteCommandForConfigServer() const override {
- return false;
- }
bool slaveOk() const override {
return true;
diff --git a/src/mongo/db/commands/group_cmd.cpp b/src/mongo/db/commands/group_cmd.cpp
index 2bbc9515f5f..e49a9081b49 100644
--- a/src/mongo/db/commands/group_cmd.cpp
+++ b/src/mongo/db/commands/group_cmd.cpp
@@ -52,10 +52,6 @@ public:
GroupCommand() : Command("group") {}
private:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
-
virtual bool maintenanceOk() const {
return false;
}
diff --git a/src/mongo/db/commands/hashcmd.cpp b/src/mongo/db/commands/hashcmd.cpp
index a4f7c437630..f65690dddb3 100644
--- a/src/mongo/db/commands/hashcmd.cpp
+++ b/src/mongo/db/commands/hashcmd.cpp
@@ -53,9 +53,6 @@ using std::stringstream;
class CmdHashElt : public Command {
public:
CmdHashElt() : Command("_hashBSONElement"){};
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp
index 5dee23e4385..936dab77670 100644
--- a/src/mongo/db/commands/index_filter_commands.cpp
+++ b/src/mongo/db/commands/index_filter_commands.cpp
@@ -144,9 +144,6 @@ bool IndexFilterCommand::run(OperationContext* txn,
return true;
}
-bool IndexFilterCommand::isWriteCommandForConfigServer() const {
- return false;
-}
bool IndexFilterCommand::slaveOk() const {
return false;
diff --git a/src/mongo/db/commands/index_filter_commands.h b/src/mongo/db/commands/index_filter_commands.h
index 9b2815dba70..ddd2553823a 100644
--- a/src/mongo/db/commands/index_filter_commands.h
+++ b/src/mongo/db/commands/index_filter_commands.h
@@ -70,8 +70,6 @@ public:
std::string& errmsg,
BSONObjBuilder& result);
- virtual bool isWriteCommandForConfigServer() const;
-
virtual bool slaveOk() const;
virtual bool slaveOverrideOk() const;
diff --git a/src/mongo/db/commands/isself.cpp b/src/mongo/db/commands/isself.cpp
index 91522b4ddb7..a3d8a3af918 100644
--- a/src/mongo/db/commands/isself.cpp
+++ b/src/mongo/db/commands/isself.cpp
@@ -45,9 +45,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "{ _isSelf : 1 } INTERNAL ONLY";
}
diff --git a/src/mongo/db/commands/kill_op.cpp b/src/mongo/db/commands/kill_op.cpp
index baaf8106220..753d48b9362 100644
--- a/src/mongo/db/commands/kill_op.cpp
+++ b/src/mongo/db/commands/kill_op.cpp
@@ -49,9 +49,6 @@ class KillOpCommand : public Command {
public:
KillOpCommand() : Command("killOp") {}
- bool isWriteCommandForConfigServer() const final {
- return false;
- }
bool slaveOk() const final {
return true;
diff --git a/src/mongo/db/commands/killcursors_common.h b/src/mongo/db/commands/killcursors_common.h
index 7e7d854ea93..7d082063858 100644
--- a/src/mongo/db/commands/killcursors_common.h
+++ b/src/mongo/db/commands/killcursors_common.h
@@ -41,9 +41,6 @@ class KillCursorsCmdBase : public Command {
public:
KillCursorsCmdBase() : Command("killCursors") {}
- bool isWriteCommandForConfigServer() const final {
- return false;
- }
bool slaveOk() const final {
return true;
diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp
index 1c21d3b561d..7895de4510d 100644
--- a/src/mongo/db/commands/list_collections.cpp
+++ b/src/mongo/db/commands/list_collections.cpp
@@ -151,9 +151,6 @@ public:
virtual bool adminOnly() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "list collections for this db";
diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp
index 886c035d076..f7184d7de7d 100644
--- a/src/mongo/db/commands/list_databases.cpp
+++ b/src/mongo/db/commands/list_databases.cpp
@@ -57,9 +57,6 @@ public:
virtual bool adminOnly() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "list databases on this server";
}
diff --git a/src/mongo/db/commands/list_indexes.cpp b/src/mongo/db/commands/list_indexes.cpp
index 6f637c17e1e..1fb0fb8ffca 100644
--- a/src/mongo/db/commands/list_indexes.cpp
+++ b/src/mongo/db/commands/list_indexes.cpp
@@ -82,9 +82,6 @@ public:
virtual bool adminOnly() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "list indexes for a collection";
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp
index 33291845269..716b0afd01f 100644
--- a/src/mongo/db/commands/mr.cpp
+++ b/src/mongo/db/commands/mr.cpp
@@ -1286,9 +1286,6 @@ public:
help << "http://dochub.mongodb.org/core/mapreduce";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
@@ -1590,9 +1587,6 @@ public:
virtual bool slaveOverrideOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {
diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp
index a9f1ad7e619..6c96f0907b8 100644
--- a/src/mongo/db/commands/oplog_note.cpp
+++ b/src/mongo/db/commands/oplog_note.cpp
@@ -54,9 +54,6 @@ public:
virtual bool adminOnly() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(stringstream& help) const {
help << "Adds a no-op entry to the oplog";
}
diff --git a/src/mongo/db/commands/parallel_collection_scan.cpp b/src/mongo/db/commands/parallel_collection_scan.cpp
index 6806ec8ab57..9acaca45d2f 100644
--- a/src/mongo/db/commands/parallel_collection_scan.cpp
+++ b/src/mongo/db/commands/parallel_collection_scan.cpp
@@ -60,9 +60,6 @@ public:
ParallelCollectionScanCmd() : Command("parallelCollectionScan") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
diff --git a/src/mongo/db/commands/parameters.cpp b/src/mongo/db/commands/parameters.cpp
index e5bb81ea032..17a85c757b3 100644
--- a/src/mongo/db/commands/parameters.cpp
+++ b/src/mongo/db/commands/parameters.cpp
@@ -71,9 +71,6 @@ public:
virtual bool adminOnly() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {
@@ -121,9 +118,6 @@ public:
virtual bool adminOnly() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {
diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp
index 0c690b32480..b04d6ffe1ef 100644
--- a/src/mongo/db/commands/pipeline_command.cpp
+++ b/src/mongo/db/commands/pipeline_command.cpp
@@ -154,9 +154,6 @@ public:
PipelineCommand() : Command(Pipeline::commandName) {} // command is called "aggregate"
// Locks are managed manually, in particular by DocumentSourceCursor.
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return false;
}
diff --git a/src/mongo/db/commands/plan_cache_commands.cpp b/src/mongo/db/commands/plan_cache_commands.cpp
index 8b5c94e74e7..49c25de5514 100644
--- a/src/mongo/db/commands/plan_cache_commands.cpp
+++ b/src/mongo/db/commands/plan_cache_commands.cpp
@@ -140,9 +140,6 @@ bool PlanCacheCommand::run(OperationContext* txn,
return true;
}
-bool PlanCacheCommand::isWriteCommandForConfigServer() const {
- return false;
-}
bool PlanCacheCommand::slaveOk() const {
return false;
diff --git a/src/mongo/db/commands/plan_cache_commands.h b/src/mongo/db/commands/plan_cache_commands.h
index d42773f42e7..f419eaed8eb 100644
--- a/src/mongo/db/commands/plan_cache_commands.h
+++ b/src/mongo/db/commands/plan_cache_commands.h
@@ -64,8 +64,6 @@ public:
std::string& errmsg,
BSONObjBuilder& result);
- virtual bool isWriteCommandForConfigServer() const;
-
virtual bool slaveOk() const;
virtual bool slaveOverrideOk() const;
diff --git a/src/mongo/db/commands/rename_collection.cpp b/src/mongo/db/commands/rename_collection.cpp
index 68c47676527..4e4eef26434 100644
--- a/src/mongo/db/commands/rename_collection.cpp
+++ b/src/mongo/db/commands/rename_collection.cpp
@@ -65,9 +65,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual Status checkAuthForCommand(ClientBasic* client,
const std::string& dbname,
const BSONObj& cmdObj) {
diff --git a/src/mongo/db/commands/repair_cursor.cpp b/src/mongo/db/commands/repair_cursor.cpp
index 82de7d406c7..8792afe2092 100644
--- a/src/mongo/db/commands/repair_cursor.cpp
+++ b/src/mongo/db/commands/repair_cursor.cpp
@@ -48,9 +48,6 @@ class RepairCursorCmd : public Command {
public:
RepairCursorCmd() : Command("repairCursor") {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
diff --git a/src/mongo/db/commands/server_status.cpp b/src/mongo/db/commands/server_status.cpp
index c4b475f6a40..e7f15f8e4cb 100644
--- a/src/mongo/db/commands/server_status.cpp
+++ b/src/mongo/db/commands/server_status.cpp
@@ -67,9 +67,6 @@ public:
CmdServerStatus()
: Command("serverStatus", true), _started(curTimeMillis64()), _runCalled(false) {}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool slaveOk() const {
return true;
}
diff --git a/src/mongo/db/commands/shutdown.h b/src/mongo/db/commands/shutdown.h
index c184c22aa4f..2bb71e7373d 100644
--- a/src/mongo/db/commands/shutdown.h
+++ b/src/mongo/db/commands/shutdown.h
@@ -54,9 +54,6 @@ public:
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out);
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
protected:
static void shutdownHelper();
diff --git a/src/mongo/db/commands/snapshot_management.cpp b/src/mongo/db/commands/snapshot_management.cpp
index 1b3828dfbc0..cb90e41d685 100644
--- a/src/mongo/db/commands/snapshot_management.cpp
+++ b/src/mongo/db/commands/snapshot_management.cpp
@@ -45,9 +45,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return true;
}
@@ -95,9 +92,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return true;
}
diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp
index 485998c4e3a..39b6ef90636 100644
--- a/src/mongo/db/commands/test_commands.cpp
+++ b/src/mongo/db/commands/test_commands.cpp
@@ -65,9 +65,6 @@ public:
virtual bool slaveOk() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
// No auth needed because it only works when enabled via command line.
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
@@ -113,10 +110,6 @@ public:
/* for diagnostic / testing purposes. Enabled via command line. */
class CmdSleep : public Command {
public:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
-
virtual bool adminOnly() const {
return true;
}
@@ -211,9 +204,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
// No auth needed because it only works when enabled via command line.
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
@@ -281,9 +271,6 @@ public:
virtual bool slaveOk() const {
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
// No auth needed because it only works when enabled via command line.
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
diff --git a/src/mongo/db/commands/top_command.cpp b/src/mongo/db/commands/top_command.cpp
index b716457f311..70407d67ea6 100644
--- a/src/mongo/db/commands/top_command.cpp
+++ b/src/mongo/db/commands/top_command.cpp
@@ -52,9 +52,6 @@ public:
virtual bool adminOnly() const {
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void help(std::stringstream& help) const {
help << "usage by collection, in micros ";
}
diff --git a/src/mongo/db/commands/touch.cpp b/src/mongo/db/commands/touch.cpp
index 9beace559f2..530d8937588 100644
--- a/src/mongo/db/commands/touch.cpp
+++ b/src/mongo/db/commands/touch.cpp
@@ -57,9 +57,6 @@ using std::stringstream;
class TouchCmd : public Command {
public:
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual bool adminOnly() const {
return false;
}
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp
index 9a48de6d74e..5e35694173e 100644
--- a/src/mongo/db/commands/user_management_commands.cpp
+++ b/src/mongo/db/commands/user_management_commands.cpp
@@ -608,9 +608,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Adds a user to the system" << endl;
@@ -753,9 +750,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Used to update a user, for example to change its password" << endl;
@@ -870,9 +864,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Drops a single user." << endl;
@@ -942,9 +933,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Drops all users for a single database." << endl;
@@ -1004,9 +992,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Grants roles to a user." << endl;
@@ -1079,9 +1064,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Revokes roles from a user." << endl;
@@ -1156,9 +1138,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
CmdUsersInfo() : Command("usersInfo") {}
@@ -1310,9 +1289,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Adds a role to the system" << endl;
@@ -1424,9 +1400,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Used to update a role" << endl;
@@ -1523,9 +1496,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Grants privileges to a role" << endl;
@@ -1631,9 +1601,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Revokes privileges from a role" << endl;
@@ -1747,9 +1714,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Grants roles to another role." << endl;
@@ -1842,9 +1806,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Revokes roles from another role." << endl;
@@ -1931,9 +1892,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Drops a single role. Before deleting the role completely it must remove it "
@@ -2085,9 +2043,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Drops all roles from the given database. Before deleting the roles completely "
@@ -2208,9 +2163,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
CmdRolesInfo() : Command("rolesInfo") {}
@@ -2283,9 +2235,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
CmdInvalidateUserCache() : Command("invalidateUserCache") {}
@@ -2322,9 +2271,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
CmdGetCacheGeneration() : Command("_getUserCacheGeneration") {}
@@ -2369,9 +2315,6 @@ public:
return false;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual bool adminOnly() const {
return true;
@@ -2954,9 +2897,6 @@ public:
return true;
}
- virtual bool isWriteCommandForConfigServer() const {
- return true;
- }
virtual void help(stringstream& ss) const {
ss << "Upgrades the auth data storage schema";
diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp
index 93693e68c57..d9b7a588188 100644
--- a/src/mongo/db/commands/validate.cpp
+++ b/src/mongo/db/commands/validate.cpp
@@ -59,9 +59,6 @@ public:
"Add full:true option to do a more thorough check";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {
diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp
index 4d5f625c948..cd3c13674a1 100644
--- a/src/mongo/db/commands/write_commands/write_commands.cpp
+++ b/src/mongo/db/commands/write_commands/write_commands.cpp
@@ -91,9 +91,6 @@ bool WriteCmd::slaveOk() const {
return false;
}
-bool WriteCmd::isWriteCommandForConfigServer() const {
- return false;
-}
Status WriteCmd::checkAuthForCommand(ClientBasic* client,
const std::string& dbname,
diff --git a/src/mongo/db/commands/write_commands/write_commands.h b/src/mongo/db/commands/write_commands/write_commands.h
index 8ea3d37411a..e8dfaaa9608 100644
--- a/src/mongo/db/commands/write_commands/write_commands.h
+++ b/src/mongo/db/commands/write_commands/write_commands.h
@@ -63,8 +63,6 @@ protected:
private:
virtual bool slaveOk() const;
- virtual bool isWriteCommandForConfigServer() const;
-
virtual Status checkAuthForCommand(ClientBasic* client,
const std::string& dbname,
const BSONObj& cmdObj);
diff --git a/src/mongo/db/commands/writeback_compatibility_shim.cpp b/src/mongo/db/commands/writeback_compatibility_shim.cpp
index b03cf3b21dc..3c56cac9415 100644
--- a/src/mongo/db/commands/writeback_compatibility_shim.cpp
+++ b/src/mongo/db/commands/writeback_compatibility_shim.cpp
@@ -61,9 +61,6 @@ public:
helpOut << "v3.0 disallowed internal command, present for compatibility only";
}
- virtual bool isWriteCommandForConfigServer() const {
- return false;
- }
//
// Same as v2.6 settings