summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_is_master_cmd.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-07-18 16:30:39 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-07-24 11:00:05 -0400
commitffe425ee16d9c597732350dfe6de73b2fd9305d0 (patch)
tree5c285e67e654e63abd9971eef8a09a24b7059e3c /src/mongo/s/commands/cluster_is_master_cmd.cpp
parent13915db6589720b7c8cabd9663f023b2db49c401 (diff)
downloadmongo-ffe425ee16d9c597732350dfe6de73b2fd9305d0.tar.gz
SERVER-28752 Get rid of all usages of Batched Insert/Update/Delete Request outside of BatchedCommandRequest
Diffstat (limited to 'src/mongo/s/commands/cluster_is_master_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_is_master_cmd.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/mongo/s/commands/cluster_is_master_cmd.cpp b/src/mongo/s/commands/cluster_is_master_cmd.cpp
index 0209981de08..979ab6f531c 100644
--- a/src/mongo/s/commands/cluster_is_master_cmd.cpp
+++ b/src/mongo/s/commands/cluster_is_master_cmd.cpp
@@ -31,13 +31,12 @@
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
#include "mongo/db/operation_context.h"
+#include "mongo/db/ops/write_ops.h"
#include "mongo/db/server_options.h"
#include "mongo/db/server_parameters.h"
#include "mongo/db/wire_version.h"
#include "mongo/rpc/metadata/client_metadata.h"
#include "mongo/rpc/metadata/client_metadata_ismaster.h"
-#include "mongo/s/grid.h"
-#include "mongo/s/write_ops/batched_command_request.h"
#include "mongo/transport/message_compressor_manager.h"
#include "mongo/util/map_util.h"
@@ -48,30 +47,28 @@ class CmdIsMaster : public BasicCommand {
public:
CmdIsMaster() : BasicCommand("isMaster", "ismaster") {}
-
- virtual bool supportsWriteConcern(const BSONObj& cmd) const override {
+ bool supportsWriteConcern(const BSONObj& cmd) const override {
return false;
}
- virtual bool slaveOk() const {
+ bool slaveOk() const override {
return true;
}
- virtual void help(std::stringstream& help) const {
+ void help(std::stringstream& help) const override {
help << "test if this is master half of a replica pair";
}
- virtual void addRequiredPrivileges(const std::string& dbname,
- const BSONObj& cmdObj,
- std::vector<Privilege>* out) {
+ void addRequiredPrivileges(const std::string& dbname,
+ const BSONObj& cmdObj,
+ std::vector<Privilege>* out) override {
// No auth required
}
- virtual bool run(OperationContext* opCtx,
- const std::string& dbname,
- const BSONObj& cmdObj,
- BSONObjBuilder& result) {
-
+ bool run(OperationContext* opCtx,
+ const std::string& dbname,
+ const BSONObj& cmdObj,
+ BSONObjBuilder& result) override {
auto& clientMetadataIsMasterState = ClientMetadataIsMasterState::get(opCtx->getClient());
bool seenIsMaster = clientMetadataIsMasterState.hasSeenIsMaster();
if (!seenIsMaster) {
@@ -105,7 +102,7 @@ public:
result.append("msg", "isdbgrid");
result.appendNumber("maxBsonObjectSize", BSONObjMaxUserSize);
result.appendNumber("maxMessageSizeBytes", MaxMessageSizeBytes);
- result.appendNumber("maxWriteBatchSize", BatchedCommandRequest::kMaxWriteBatchSize);
+ result.appendNumber("maxWriteBatchSize", write_ops::kMaxWriteBatchSize);
result.appendDate("localTime", jsTime());
// Mongos tries to keep exactly the same version range of the server for which