summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/chunk_manager_targeter.cpp4
-rw-r--r--src/mongo/s/cluster_explain.cpp2
-rw-r--r--src/mongo/s/commands/cluster_write_cmd.cpp2
-rw-r--r--src/mongo/s/config_upgrade_helpers.cpp2
-rw-r--r--src/mongo/s/dbclient_multi_command.cpp6
-rw-r--r--src/mongo/s/dbclient_multi_command.h4
-rw-r--r--src/mongo/s/distlock.cpp8
-rw-r--r--src/mongo/s/grid.cpp2
-rw-r--r--src/mongo/s/grid.h2
-rw-r--r--src/mongo/s/mock_multi_write_command.h2
-rw-r--r--src/mongo/s/mongo_version_range.cpp4
-rw-r--r--src/mongo/s/mongo_version_range.h4
-rw-r--r--src/mongo/s/multi_command_dispatch.h2
-rw-r--r--src/mongo/s/multi_host_query_test.cpp2
-rw-r--r--src/mongo/s/shard_key_pattern.cpp2
-rw-r--r--src/mongo/s/type_actionlog.h4
-rw-r--r--src/mongo/s/type_changelog.h10
-rw-r--r--src/mongo/s/type_chunk.h6
-rw-r--r--src/mongo/s/type_collection.h2
-rw-r--r--src/mongo/s/type_database.h4
-rw-r--r--src/mongo/s/type_lockpings.h2
-rw-r--r--src/mongo/s/type_locks.h2
-rw-r--r--src/mongo/s/type_mongos.h4
-rw-r--r--src/mongo/s/type_settings.h2
-rw-r--r--src/mongo/s/type_shard.h4
-rw-r--r--src/mongo/s/type_tags.h4
-rw-r--r--src/mongo/s/write_ops/batch_downconvert.cpp2
-rw-r--r--src/mongo/s/write_ops/batch_downconvert.h2
-rw-r--r--src/mongo/s/write_ops/batched_command_request.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_command_request.h2
-rw-r--r--src/mongo/s/write_ops/batched_command_response.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_command_response.h2
-rw-r--r--src/mongo/s/write_ops/batched_delete_request.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_delete_request.h2
-rw-r--r--src/mongo/s/write_ops/batched_insert_request.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_insert_request.h2
-rw-r--r--src/mongo/s/write_ops/batched_request_metadata.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_request_metadata.h2
-rw-r--r--src/mongo/s/write_ops/batched_update_request.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_update_request.h2
-rw-r--r--src/mongo/s/write_ops/config_coordinator.cpp4
-rw-r--r--src/mongo/s/write_ops/wc_error_detail.cpp2
-rw-r--r--src/mongo/s/write_ops/wc_error_detail.h2
-rw-r--r--src/mongo/s/write_ops/write_error_detail.cpp2
-rw-r--r--src/mongo/s/write_ops/write_error_detail.h2
45 files changed, 66 insertions, 66 deletions
diff --git a/src/mongo/s/chunk_manager_targeter.cpp b/src/mongo/s/chunk_manager_targeter.cpp
index 7ae106245e6..83ca4cfe07c 100644
--- a/src/mongo/s/chunk_manager_targeter.cpp
+++ b/src/mongo/s/chunk_manager_targeter.cpp
@@ -48,7 +48,7 @@ namespace mongo {
/**
* Helper to get the DBConfigPtr object in an exception-safe way.
*/
- static bool getDBConfigSafe( const StringData& db, DBConfigPtr& config, string* errMsg ) {
+ static bool getDBConfigSafe( StringData db, DBConfigPtr& config, string* errMsg ) {
try {
config = grid.getDBConfig( db, true );
if ( !config ) *errMsg = stream() << "could not load or create database " << db;
@@ -491,7 +491,7 @@ namespace mongo {
else return CompareResult_GTE;
}
- ChunkVersion getShardVersion( const StringData& shardName,
+ ChunkVersion getShardVersion( StringData shardName,
const ChunkManagerPtr& manager,
const ShardPtr& primary ) {
diff --git a/src/mongo/s/cluster_explain.cpp b/src/mongo/s/cluster_explain.cpp
index 75b63382540..0443a0f8396 100644
--- a/src/mongo/s/cluster_explain.cpp
+++ b/src/mongo/s/cluster_explain.cpp
@@ -51,7 +51,7 @@ namespace mongo {
bool appendIfRoom(BSONObjBuilder* bob,
const BSONObj& toAppend,
- const StringData& fieldName) {
+ StringData fieldName) {
if ((bob->len() + toAppend.objsize()) < BSONObjMaxUserSize) {
bob->append(fieldName, toAppend);
return true;
diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp
index 940cc1bc5da..1b8828a4824 100644
--- a/src/mongo/s/commands/cluster_write_cmd.cpp
+++ b/src/mongo/s/commands/cluster_write_cmd.cpp
@@ -108,7 +108,7 @@ namespace mongo {
* Instantiates a command that can be invoked by "name", which will be capable of issuing
* write batches of type "writeType", and will require privilege "action" to run.
*/
- ClusterWriteCmd( const StringData& name, BatchedCommandRequest::BatchType writeType ) :
+ ClusterWriteCmd( StringData name, BatchedCommandRequest::BatchType writeType ) :
Command( name ), _writeType( writeType ) {
}
diff --git a/src/mongo/s/config_upgrade_helpers.cpp b/src/mongo/s/config_upgrade_helpers.cpp
index 228d3c27738..bb60f91a7be 100644
--- a/src/mongo/s/config_upgrade_helpers.cpp
+++ b/src/mongo/s/config_upgrade_helpers.cpp
@@ -99,7 +99,7 @@ namespace mongo {
return Status::OK();
}
- string _extractHashFor(const BSONObj& dbHashResult, const StringData& collName) {
+ string _extractHashFor(const BSONObj& dbHashResult, StringData collName) {
if (dbHashResult["collections"].type() != Object
|| dbHashResult["collections"].Obj()[collName].type() != String)
diff --git a/src/mongo/s/dbclient_multi_command.cpp b/src/mongo/s/dbclient_multi_command.cpp
index 8454b99067c..b29a2697aff 100644
--- a/src/mongo/s/dbclient_multi_command.cpp
+++ b/src/mongo/s/dbclient_multi_command.cpp
@@ -47,7 +47,7 @@ namespace mongo {
using std::string;
DBClientMultiCommand::PendingCommand::PendingCommand( const ConnectionString& endpoint,
- const StringData& dbName,
+ StringData dbName,
const BSONObj& cmdObj ) :
endpoint( endpoint ),
dbName( dbName.toString() ),
@@ -57,7 +57,7 @@ namespace mongo {
}
void DBClientMultiCommand::addCommand( const ConnectionString& endpoint,
- const StringData& dbName,
+ StringData dbName,
const BSONSerializable& request ) {
PendingCommand* command = new PendingCommand( endpoint, dbName, request.toBSON() );
_pendingCommands.push_back( command );
@@ -88,7 +88,7 @@ namespace mongo {
}
// THROWS
- static void sayAsCmd( DBClientBase* conn, const StringData& dbName, const BSONObj& cmdObj ) {
+ static void sayAsCmd( DBClientBase* conn, StringData dbName, const BSONObj& cmdObj ) {
Message toSend;
BSONObjBuilder usersBuilder;
usersBuilder.appendElements(cmdObj);
diff --git a/src/mongo/s/dbclient_multi_command.h b/src/mongo/s/dbclient_multi_command.h
index abcc3eeebb4..b3b0d548234 100644
--- a/src/mongo/s/dbclient_multi_command.h
+++ b/src/mongo/s/dbclient_multi_command.h
@@ -49,7 +49,7 @@ namespace mongo {
~DBClientMultiCommand();
void addCommand( const ConnectionString& endpoint,
- const StringData& dbName,
+ StringData dbName,
const BSONSerializable& request );
void sendAll();
@@ -66,7 +66,7 @@ namespace mongo {
struct PendingCommand {
PendingCommand( const ConnectionString& endpoint,
- const StringData& dbName,
+ StringData dbName,
const BSONObj& cmdObj );
// What to send
diff --git a/src/mongo/s/distlock.cpp b/src/mongo/s/distlock.cpp
index 02a60a34fd1..651811f3ef6 100644
--- a/src/mongo/s/distlock.cpp
+++ b/src/mongo/s/distlock.cpp
@@ -589,10 +589,10 @@ namespace mongo {
return Status::OK();
}
- static void logErrMsgOrWarn(const StringData& messagePrefix,
- const StringData& lockName,
- const StringData& errMsg,
- const StringData& altErrMsg) {
+ static void logErrMsgOrWarn(StringData messagePrefix,
+ StringData lockName,
+ StringData errMsg,
+ StringData altErrMsg) {
if (errMsg.empty()) {
LOG(DistributedLock::logLvl - 1) << messagePrefix << " '" << lockName << "' " <<
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index 53873173070..f70431ffc6c 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -69,7 +69,7 @@ namespace mongo {
MONGO_FP_DECLARE(neverBalance);
- DBConfigPtr Grid::getDBConfig( const StringData& ns , bool create , const string& shardNameHint ) {
+ DBConfigPtr Grid::getDBConfig( StringData ns , bool create , const string& shardNameHint ) {
string database = nsToDatabase( ns );
if ( database == "config" )
diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h
index 7bebf85c58d..e7a3f1221d5 100644
--- a/src/mongo/s/grid.h
+++ b/src/mongo/s/grid.h
@@ -52,7 +52,7 @@ namespace mongo {
* gets the config the db.
* will return an empty DBConfig if not in db already
*/
- DBConfigPtr getDBConfig( const StringData& ns , bool create=true , const std::string& shardNameHint="" );
+ DBConfigPtr getDBConfig( StringData ns , bool create=true , const std::string& shardNameHint="" );
/**
* removes db entry.
diff --git a/src/mongo/s/mock_multi_write_command.h b/src/mongo/s/mock_multi_write_command.h
index 726bf0c9eeb..95ab98a5f25 100644
--- a/src/mongo/s/mock_multi_write_command.h
+++ b/src/mongo/s/mock_multi_write_command.h
@@ -102,7 +102,7 @@ namespace mongo {
}
void addCommand( const ConnectionString& endpoint,
- const StringData& dbName,
+ StringData dbName,
const BSONSerializable& request ) {
_pending.push_back( endpoint );
}
diff --git a/src/mongo/s/mongo_version_range.cpp b/src/mongo/s/mongo_version_range.cpp
index b3dc3f09c75..82870e20418 100644
--- a/src/mongo/s/mongo_version_range.cpp
+++ b/src/mongo/s/mongo_version_range.cpp
@@ -144,7 +144,7 @@ namespace mongo {
}
}
- bool MongoVersionRange::isInRange(const StringData& version) const {
+ bool MongoVersionRange::isInRange(StringData version) const {
if (maxVersion == "") {
// If a prefix of the version specified is excluded, the specified version is
@@ -164,7 +164,7 @@ namespace mongo {
return false;
}
- bool isInMongoVersionRanges(const StringData& version, const vector<MongoVersionRange>& ranges)
+ bool isInMongoVersionRanges(StringData version, const vector<MongoVersionRange>& ranges)
{
for (vector<MongoVersionRange>::const_iterator it = ranges.begin(); it != ranges.end();
++it)
diff --git a/src/mongo/s/mongo_version_range.h b/src/mongo/s/mongo_version_range.h
index 94a47484a86..fcdc4dca4c2 100644
--- a/src/mongo/s/mongo_version_range.h
+++ b/src/mongo/s/mongo_version_range.h
@@ -57,12 +57,12 @@ namespace mongo {
void toBSONElement(BSONArrayBuilder* barr) const;
- bool isInRange(const StringData& version) const;
+ bool isInRange(StringData version) const;
std::string minVersion;
std::string maxVersion;
};
- bool isInMongoVersionRanges(const StringData& version,
+ bool isInMongoVersionRanges(StringData version,
const std::vector<MongoVersionRange>& ranges);
}
diff --git a/src/mongo/s/multi_command_dispatch.h b/src/mongo/s/multi_command_dispatch.h
index bc3d0340ad5..f9470091637 100644
--- a/src/mongo/s/multi_command_dispatch.h
+++ b/src/mongo/s/multi_command_dispatch.h
@@ -57,7 +57,7 @@ namespace mongo {
* Commands are not sent immediately, they are sent on sendAll.
*/
virtual void addCommand( const ConnectionString& endpoint,
- const StringData& dbName,
+ StringData dbName,
const BSONSerializable& request ) = 0;
/**
diff --git a/src/mongo/s/multi_host_query_test.cpp b/src/mongo/s/multi_host_query_test.cpp
index 5c98bb0519e..1c6757c882b 100644
--- a/src/mongo/s/multi_host_query_test.cpp
+++ b/src/mongo/s/multi_host_query_test.cpp
@@ -411,7 +411,7 @@ namespace {
};
- QuerySpec buildSpec(const StringData& ns, const BSONObj& query) {
+ QuerySpec buildSpec(StringData ns, const BSONObj& query) {
return QuerySpec(ns.toString(), query, BSONObj(), 0, 0, 0);
}
diff --git a/src/mongo/s/shard_key_pattern.cpp b/src/mongo/s/shard_key_pattern.cpp
index f413be24efa..6669d68b007 100644
--- a/src/mongo/s/shard_key_pattern.cpp
+++ b/src/mongo/s/shard_key_pattern.cpp
@@ -203,7 +203,7 @@ namespace mongo {
}
static BSONElement extractKeyElementFromMatchable(const MatchableDocument& matchable,
- const StringData& pathStr) {
+ StringData pathStr) {
ElementPath path;
path.init(pathStr);
path.setTraverseNonleafArrays(false);
diff --git a/src/mongo/s/type_actionlog.h b/src/mongo/s/type_actionlog.h
index 802e573abfa..bba7703371c 100644
--- a/src/mongo/s/type_actionlog.h
+++ b/src/mongo/s/type_actionlog.h
@@ -127,7 +127,7 @@ namespace mongo {
// individual field accessors
//
- void setServer(const StringData& server) {
+ void setServer(StringData server) {
_server = server.toString();
_isServerSet = true;
}
@@ -142,7 +142,7 @@ namespace mongo {
return _what;
}
- void setWhat(const StringData& what) {
+ void setWhat(StringData what) {
_what = what.toString();
_isWhatSet = true;
}
diff --git a/src/mongo/s/type_changelog.h b/src/mongo/s/type_changelog.h
index 44a30fdba7e..7cbe4e2addc 100644
--- a/src/mongo/s/type_changelog.h
+++ b/src/mongo/s/type_changelog.h
@@ -121,7 +121,7 @@ namespace mongo {
//
// Mandatory Fields
- void setChangeID(const StringData& changeID) {
+ void setChangeID(StringData changeID) {
_changeID = changeID.toString();
_isChangeIDSet = true;
}
@@ -136,7 +136,7 @@ namespace mongo {
return _changeID;
}
- void setServer(const StringData& server) {
+ void setServer(StringData server) {
_server = server.toString();
_isServerSet = true;
}
@@ -151,7 +151,7 @@ namespace mongo {
return _server;
}
- void setClientAddr(const StringData& clientAddr) {
+ void setClientAddr(StringData clientAddr) {
_clientAddr = clientAddr.toString();
_isClientAddrSet = true;
}
@@ -181,7 +181,7 @@ namespace mongo {
return _time;
}
- void setWhat(const StringData& what) {
+ void setWhat(StringData what) {
_what = what.toString();
_isWhatSet = true;
}
@@ -196,7 +196,7 @@ namespace mongo {
return _what;
}
- void setNS(const StringData& ns) {
+ void setNS(StringData ns) {
_ns = ns.toString();
_isNsSet = true;
}
diff --git a/src/mongo/s/type_chunk.h b/src/mongo/s/type_chunk.h
index 7819025bb71..7580268f01c 100644
--- a/src/mongo/s/type_chunk.h
+++ b/src/mongo/s/type_chunk.h
@@ -125,7 +125,7 @@ namespace mongo {
//
// Mandatory Fields
- void setName(const StringData& name) {
+ void setName(StringData name) {
_name = name.toString();
_isNameSet = true;
}
@@ -140,7 +140,7 @@ namespace mongo {
return _name;
}
- void setNS(const StringData& ns) {
+ void setNS(StringData ns) {
_ns = ns.toString();
_isNsSet = true;
}
@@ -200,7 +200,7 @@ namespace mongo {
return _version;
}
- void setShard(const StringData& shard) {
+ void setShard(StringData shard) {
_shard = shard.toString();
_isShardSet = true;
}
diff --git a/src/mongo/s/type_collection.h b/src/mongo/s/type_collection.h
index 8f1be36109a..dcbedfa8436 100644
--- a/src/mongo/s/type_collection.h
+++ b/src/mongo/s/type_collection.h
@@ -124,7 +124,7 @@ namespace mongo {
//
// Mandatory Fields
- void setNS(const StringData& ns) {
+ void setNS(StringData ns) {
_ns = ns.toString();
_isNsSet = true;
}
diff --git a/src/mongo/s/type_database.h b/src/mongo/s/type_database.h
index 28b68005b32..e94d35686c8 100644
--- a/src/mongo/s/type_database.h
+++ b/src/mongo/s/type_database.h
@@ -120,7 +120,7 @@ namespace mongo {
//
// Mandatory Fields
- void setName(const StringData& name) {
+ void setName(StringData name) {
_name = name.toString();
_isNameSet = true;
}
@@ -135,7 +135,7 @@ namespace mongo {
return _name;
}
- void setPrimary(const StringData& primary) {
+ void setPrimary(StringData primary) {
_primary = primary.toString();
_isPrimarySet = true;
}
diff --git a/src/mongo/s/type_lockpings.h b/src/mongo/s/type_lockpings.h
index 64dcafa283a..583800f7b93 100644
--- a/src/mongo/s/type_lockpings.h
+++ b/src/mongo/s/type_lockpings.h
@@ -116,7 +116,7 @@ namespace mongo {
//
// Mandatory Fields
- void setProcess(const StringData& process) {
+ void setProcess(StringData process) {
_process = process.toString();
_isProcessSet = true;
}
diff --git a/src/mongo/s/type_locks.h b/src/mongo/s/type_locks.h
index 379fb7d5d3d..7294a7b8c41 100644
--- a/src/mongo/s/type_locks.h
+++ b/src/mongo/s/type_locks.h
@@ -120,7 +120,7 @@ namespace mongo {
//
// Mandatory Fields
- void setName(const StringData& name) {
+ void setName(StringData name) {
_name = name.toString();
_isNameSet = true;
}
diff --git a/src/mongo/s/type_mongos.h b/src/mongo/s/type_mongos.h
index fa176b5885a..9969fca4815 100644
--- a/src/mongo/s/type_mongos.h
+++ b/src/mongo/s/type_mongos.h
@@ -120,7 +120,7 @@ namespace mongo {
//
// Mandatory Fields
- void setName(const StringData& name) {
+ void setName(StringData name) {
_name = name.toString();
_isNameSet = true;
}
@@ -181,7 +181,7 @@ namespace mongo {
}
// Optional Fields
- void setMongoVersion(const StringData& mongoVersion) {
+ void setMongoVersion(StringData mongoVersion) {
_mongoVersion = mongoVersion.toString();
_isMongoVersionSet = true;
}
diff --git a/src/mongo/s/type_settings.h b/src/mongo/s/type_settings.h
index 114e2dfadf5..9d6cbe26b5b 100644
--- a/src/mongo/s/type_settings.h
+++ b/src/mongo/s/type_settings.h
@@ -130,7 +130,7 @@ namespace mongo {
//
// Mandatory Fields
- void setKey(const StringData& key) {
+ void setKey(StringData key) {
_key = key.toString();
_isKeySet = true;
}
diff --git a/src/mongo/s/type_shard.h b/src/mongo/s/type_shard.h
index 2c2e20d64fc..e61184cbec2 100644
--- a/src/mongo/s/type_shard.h
+++ b/src/mongo/s/type_shard.h
@@ -119,7 +119,7 @@ namespace mongo {
//
// Mandatory Fields
- void setName(const StringData& name) {
+ void setName(StringData name) {
_name = name.toString();
_isNameSet = true;
}
@@ -134,7 +134,7 @@ namespace mongo {
return _name;
}
- void setHost(const StringData& host) {
+ void setHost(StringData host) {
_host = host.toString();
_isHostSet = true;
}
diff --git a/src/mongo/s/type_tags.h b/src/mongo/s/type_tags.h
index 95218e606c4..6c8d19a17f1 100644
--- a/src/mongo/s/type_tags.h
+++ b/src/mongo/s/type_tags.h
@@ -118,7 +118,7 @@ namespace mongo {
//
// Mandatory Fields
- void setNS(const StringData& ns) {
+ void setNS(StringData ns) {
_ns = ns.toString();
_isNsSet = true;
}
@@ -133,7 +133,7 @@ namespace mongo {
return _ns;
}
- void setTag(const StringData& tag) {
+ void setTag(StringData tag) {
_tag = tag.toString();
_isTagSet = true;
}
diff --git a/src/mongo/s/write_ops/batch_downconvert.cpp b/src/mongo/s/write_ops/batch_downconvert.cpp
index b6ca7bc6c44..a0eff3dd1d2 100644
--- a/src/mongo/s/write_ops/batch_downconvert.cpp
+++ b/src/mongo/s/write_ops/batch_downconvert.cpp
@@ -246,7 +246,7 @@ namespace mongo {
}
Status enforceLegacyWriteConcern( MultiCommandDispatch* dispatcher,
- const StringData& dbName,
+ StringData dbName,
const BSONObj& options,
const HostOpTimeMap& hostOpTimes,
vector<LegacyWCResponse>* legacyWCResponses ) {
diff --git a/src/mongo/s/write_ops/batch_downconvert.h b/src/mongo/s/write_ops/batch_downconvert.h
index c0d003645f6..14dcfbecdf7 100644
--- a/src/mongo/s/write_ops/batch_downconvert.h
+++ b/src/mongo/s/write_ops/batch_downconvert.h
@@ -61,7 +61,7 @@ namespace mongo {
* Returns !OK if there was an error getting a GLE response
*/
Status enforceLegacyWriteConcern( MultiCommandDispatch* dispatcher,
- const StringData& dbName,
+ StringData dbName,
const BSONObj& options,
const HostOpTimeMap& hostOpTimes,
std::vector<LegacyWCResponse>* wcResponses );
diff --git a/src/mongo/s/write_ops/batched_command_request.cpp b/src/mongo/s/write_ops/batched_command_request.cpp
index bbf8dee717a..70bfd38327f 100644
--- a/src/mongo/s/write_ops/batched_command_request.cpp
+++ b/src/mongo/s/write_ops/batched_command_request.cpp
@@ -206,7 +206,7 @@ namespace mongo {
INVOKE( setCollNameNS, nss );
}
- void BatchedCommandRequest::setNS( const StringData& collName ) {
+ void BatchedCommandRequest::setNS( StringData collName ) {
INVOKE( setCollName, collName );
}
diff --git a/src/mongo/s/write_ops/batched_command_request.h b/src/mongo/s/write_ops/batched_command_request.h
index 4b51f406ee3..2ee661e248d 100644
--- a/src/mongo/s/write_ops/batched_command_request.h
+++ b/src/mongo/s/write_ops/batched_command_request.h
@@ -123,7 +123,7 @@ namespace mongo {
bool isVerboseWC() const;
void setNSS( const NamespaceString& nss );
- void setNS( const StringData& collName );
+ void setNS( StringData collName );
const std::string& getNS() const;
const NamespaceString& getNSS() const;
diff --git a/src/mongo/s/write_ops/batched_command_response.cpp b/src/mongo/s/write_ops/batched_command_response.cpp
index 3928e1b4812..a01dd16a77d 100644
--- a/src/mongo/s/write_ops/batched_command_response.cpp
+++ b/src/mongo/s/write_ops/batched_command_response.cpp
@@ -340,7 +340,7 @@ namespace mongo {
}
}
- void BatchedCommandResponse::setErrMessage(const StringData& errMessage) {
+ void BatchedCommandResponse::setErrMessage(StringData errMessage) {
_errMessage = errMessage.toString();
_isErrMessageSet = true;
}
diff --git a/src/mongo/s/write_ops/batched_command_response.h b/src/mongo/s/write_ops/batched_command_response.h
index 5b66be7dc25..c7938b5954e 100644
--- a/src/mongo/s/write_ops/batched_command_response.h
+++ b/src/mongo/s/write_ops/batched_command_response.h
@@ -98,7 +98,7 @@ namespace mongo {
bool isErrCodeSet() const;
int getErrCode() const;
- void setErrMessage(const StringData& errMessage);
+ void setErrMessage(StringData errMessage);
void unsetErrMessage();
bool isErrMessageSet() const;
const std::string& getErrMessage() const;
diff --git a/src/mongo/s/write_ops/batched_delete_request.cpp b/src/mongo/s/write_ops/batched_delete_request.cpp
index eea7820d76e..a1f3b6cd049 100644
--- a/src/mongo/s/write_ops/batched_delete_request.cpp
+++ b/src/mongo/s/write_ops/batched_delete_request.cpp
@@ -183,7 +183,7 @@ namespace mongo {
return toBSON().toString();
}
- void BatchedDeleteRequest::setCollName(const StringData& collName) {
+ void BatchedDeleteRequest::setCollName(StringData collName) {
_collName = NamespaceString(collName);
_isCollNameSet = true;
}
diff --git a/src/mongo/s/write_ops/batched_delete_request.h b/src/mongo/s/write_ops/batched_delete_request.h
index 8389d5b0f27..122d488c707 100644
--- a/src/mongo/s/write_ops/batched_delete_request.h
+++ b/src/mongo/s/write_ops/batched_delete_request.h
@@ -88,7 +88,7 @@ namespace mongo {
// individual field accessors
//
- void setCollName(const StringData& collName);
+ void setCollName(StringData collName);
void setCollNameNS(const NamespaceString& collName);
const std::string& getCollName() const;
const NamespaceString& getCollNameNS() const;
diff --git a/src/mongo/s/write_ops/batched_insert_request.cpp b/src/mongo/s/write_ops/batched_insert_request.cpp
index 7236b4418e5..d7300a05575 100644
--- a/src/mongo/s/write_ops/batched_insert_request.cpp
+++ b/src/mongo/s/write_ops/batched_insert_request.cpp
@@ -204,7 +204,7 @@ namespace mongo {
return toBSON().toString();
}
- void BatchedInsertRequest::setCollName(const StringData& collName) {
+ void BatchedInsertRequest::setCollName(StringData collName) {
_collName = NamespaceString(collName);
_isCollNameSet = true;
}
diff --git a/src/mongo/s/write_ops/batched_insert_request.h b/src/mongo/s/write_ops/batched_insert_request.h
index 151ab1bd4b0..b183c269610 100644
--- a/src/mongo/s/write_ops/batched_insert_request.h
+++ b/src/mongo/s/write_ops/batched_insert_request.h
@@ -87,7 +87,7 @@ namespace mongo {
// individual field accessors
//
- void setCollName(const StringData& collName);
+ void setCollName(StringData collName);
void setCollNameNS(const NamespaceString& collName);
const std::string& getCollName() const;
const NamespaceString& getCollNameNS() const;
diff --git a/src/mongo/s/write_ops/batched_request_metadata.cpp b/src/mongo/s/write_ops/batched_request_metadata.cpp
index cdd6ae55ffe..d1264df75eb 100644
--- a/src/mongo/s/write_ops/batched_request_metadata.cpp
+++ b/src/mongo/s/write_ops/batched_request_metadata.cpp
@@ -118,7 +118,7 @@ namespace mongo {
other->_isSessionSet = _isSessionSet;
}
- void BatchedRequestMetadata::setShardName( const StringData& shardName ) {
+ void BatchedRequestMetadata::setShardName( StringData shardName ) {
_shardName = shardName.toString();
_isShardNameSet = true;
}
diff --git a/src/mongo/s/write_ops/batched_request_metadata.h b/src/mongo/s/write_ops/batched_request_metadata.h
index 648a0dcc4a5..e2dd99df0c1 100644
--- a/src/mongo/s/write_ops/batched_request_metadata.h
+++ b/src/mongo/s/write_ops/batched_request_metadata.h
@@ -64,7 +64,7 @@ namespace mongo {
// individual field accessors
//
- void setShardName(const StringData& shardName);
+ void setShardName(StringData shardName);
void unsetShardName();
bool isShardNameSet() const;
const std::string& getShardName() const;
diff --git a/src/mongo/s/write_ops/batched_update_request.cpp b/src/mongo/s/write_ops/batched_update_request.cpp
index fbb12af2038..4e03f91a793 100644
--- a/src/mongo/s/write_ops/batched_update_request.cpp
+++ b/src/mongo/s/write_ops/batched_update_request.cpp
@@ -195,7 +195,7 @@ namespace mongo {
return toBSON().toString();
}
- void BatchedUpdateRequest::setCollName(const StringData& collName) {
+ void BatchedUpdateRequest::setCollName(StringData collName) {
_collName = NamespaceString(collName);
_isCollNameSet = true;
}
diff --git a/src/mongo/s/write_ops/batched_update_request.h b/src/mongo/s/write_ops/batched_update_request.h
index f092c18a09b..78cf58c5c01 100644
--- a/src/mongo/s/write_ops/batched_update_request.h
+++ b/src/mongo/s/write_ops/batched_update_request.h
@@ -88,7 +88,7 @@ namespace mongo {
// individual field accessors
//
- void setCollName(const StringData& collName);
+ void setCollName(StringData collName);
void setCollNameNS(const NamespaceString& collName);
const std::string& getCollName() const;
const NamespaceString& getCollNameNS() const;
diff --git a/src/mongo/s/write_ops/config_coordinator.cpp b/src/mongo/s/write_ops/config_coordinator.cpp
index ca36cbe1562..66b1d6723c2 100644
--- a/src/mongo/s/write_ops/config_coordinator.cpp
+++ b/src/mongo/s/write_ops/config_coordinator.cpp
@@ -183,7 +183,7 @@ namespace mongo {
return _errMessage;
}
- void setErrMessage( const StringData& errMsg ) {
+ void setErrMessage( StringData errMsg ) {
_errMessage = errMsg.toString();
_isErrMessageSet = true;
}
@@ -349,7 +349,7 @@ namespace mongo {
return _errMessage;
}
- void setErrMessage(const StringData& errMsg) {
+ void setErrMessage(StringData errMsg) {
_errMessage = errMsg.toString();
_isErrMessageSet = true;
}
diff --git a/src/mongo/s/write_ops/wc_error_detail.cpp b/src/mongo/s/write_ops/wc_error_detail.cpp
index 04dde3a8346..0f7536639ba 100644
--- a/src/mongo/s/write_ops/wc_error_detail.cpp
+++ b/src/mongo/s/write_ops/wc_error_detail.cpp
@@ -161,7 +161,7 @@ namespace mongo {
return _errInfo;
}
- void WCErrorDetail::setErrMessage(const StringData& errMessage) {
+ void WCErrorDetail::setErrMessage(StringData errMessage) {
_errMessage = errMessage.toString();
_isErrMessageSet = true;
}
diff --git a/src/mongo/s/write_ops/wc_error_detail.h b/src/mongo/s/write_ops/wc_error_detail.h
index d4052e5e8db..2f07008b02b 100644
--- a/src/mongo/s/write_ops/wc_error_detail.h
+++ b/src/mongo/s/write_ops/wc_error_detail.h
@@ -87,7 +87,7 @@ namespace mongo {
bool isErrInfoSet() const;
const BSONObj& getErrInfo() const;
- void setErrMessage(const StringData& errMessage);
+ void setErrMessage(StringData errMessage);
void unsetErrMessage();
bool isErrMessageSet() const;
const std::string& getErrMessage() const;
diff --git a/src/mongo/s/write_ops/write_error_detail.cpp b/src/mongo/s/write_ops/write_error_detail.cpp
index 65f949b411c..3d5b9725fdf 100644
--- a/src/mongo/s/write_ops/write_error_detail.cpp
+++ b/src/mongo/s/write_ops/write_error_detail.cpp
@@ -197,7 +197,7 @@ namespace mongo {
return _errInfo;
}
- void WriteErrorDetail::setErrMessage(const StringData& errMessage) {
+ void WriteErrorDetail::setErrMessage(StringData errMessage) {
_errMessage = errMessage.toString();
_isErrMessageSet = true;
}
diff --git a/src/mongo/s/write_ops/write_error_detail.h b/src/mongo/s/write_ops/write_error_detail.h
index 299285cf109..49f9b2d8384 100644
--- a/src/mongo/s/write_ops/write_error_detail.h
+++ b/src/mongo/s/write_ops/write_error_detail.h
@@ -93,7 +93,7 @@ namespace mongo {
bool isErrInfoSet() const;
const BSONObj& getErrInfo() const;
- void setErrMessage(const StringData& errMessage);
+ void setErrMessage(StringData errMessage);
void unsetErrMessage();
bool isErrMessageSet() const;
const std::string& getErrMessage() const;