summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/balance.cpp6
-rw-r--r--src/mongo/s/balancer_policy.cpp8
-rw-r--r--src/mongo/s/balancer_policy_tests.cpp6
-rw-r--r--src/mongo/s/chunk.cpp12
-rw-r--r--src/mongo/s/chunk_diff-inl.cpp6
-rw-r--r--src/mongo/s/chunk_manager_targeter.cpp6
-rw-r--r--src/mongo/s/chunk_manager_targeter_test.cpp2
-rw-r--r--src/mongo/s/client_info.cpp3
-rw-r--r--src/mongo/s/cluster_client_internal.cpp2
-rw-r--r--src/mongo/s/cluster_explain.cpp2
-rw-r--r--src/mongo/s/cluster_write.cpp4
-rw-r--r--src/mongo/s/collection_metadata.cpp6
-rw-r--r--src/mongo/s/commands/auth_schema_upgrade_s.cpp4
-rw-r--r--src/mongo/s/commands/cluster_explain_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_find_cmd.cpp4
-rw-r--r--src/mongo/s/commands/cluster_index_filter_cmd.cpp1
-rw-r--r--src/mongo/s/commands/cluster_merge_chunks_cmd.cpp4
-rw-r--r--src/mongo/s/commands/cluster_plan_cache_cmd.cpp1
-rw-r--r--src/mongo/s/commands/cluster_write_cmd.cpp4
-rw-r--r--src/mongo/s/commands_admin.cpp8
-rw-r--r--src/mongo/s/commands_public.cpp9
-rw-r--r--src/mongo/s/config.cpp6
-rw-r--r--src/mongo/s/config_upgrade.cpp6
-rw-r--r--src/mongo/s/config_upgrade_helpers.cpp4
-rw-r--r--src/mongo/s/config_upgrade_v0_to_v6.cpp3
-rw-r--r--src/mongo/s/config_upgrade_v5_to_v6.cpp2
-rw-r--r--src/mongo/s/cursors.cpp3
-rw-r--r--src/mongo/s/d_merge.cpp2
-rw-r--r--src/mongo/s/d_split.cpp8
-rw-r--r--src/mongo/s/d_state.cpp5
-rw-r--r--src/mongo/s/dbclient_multi_command.cpp2
-rw-r--r--src/mongo/s/dbclient_shard_resolver.cpp2
-rw-r--r--src/mongo/s/default_version.cpp2
-rw-r--r--src/mongo/s/distlock.cpp7
-rw-r--r--src/mongo/s/distlock_test.cpp4
-rw-r--r--src/mongo/s/grid.cpp10
-rw-r--r--src/mongo/s/metadata_loader.cpp5
-rw-r--r--src/mongo/s/mongos_options.cpp2
-rw-r--r--src/mongo/s/multi_host_query.cpp4
-rw-r--r--src/mongo/s/multi_host_query_test.cpp3
-rw-r--r--src/mongo/s/request.cpp3
-rw-r--r--src/mongo/s/s_only.cpp4
-rw-r--r--src/mongo/s/scc_fast_query_handler.cpp5
-rw-r--r--src/mongo/s/server.cpp5
-rw-r--r--src/mongo/s/shard.cpp9
-rw-r--r--src/mongo/s/shard_key_pattern.cpp2
-rw-r--r--src/mongo/s/shard_key_pattern_test.cpp2
-rw-r--r--src/mongo/s/shardconnection.cpp8
-rw-r--r--src/mongo/s/strategy.cpp5
-rw-r--r--src/mongo/s/type_actionlog.cpp2
-rw-r--r--src/mongo/s/type_changelog.cpp2
-rw-r--r--src/mongo/s/type_chunk.cpp2
-rw-r--r--src/mongo/s/type_collection.cpp2
-rw-r--r--src/mongo/s/type_config_version.cpp2
-rw-r--r--src/mongo/s/type_database.cpp2
-rw-r--r--src/mongo/s/type_lockpings.cpp2
-rw-r--r--src/mongo/s/type_locks.cpp2
-rw-r--r--src/mongo/s/type_mongos.cpp2
-rw-r--r--src/mongo/s/type_settings.cpp3
-rw-r--r--src/mongo/s/type_shard.cpp2
-rw-r--r--src/mongo/s/type_tags.cpp2
-rw-r--r--src/mongo/s/version_manager.cpp4
-rw-r--r--src/mongo/s/write_ops/batch_downconvert.cpp4
-rw-r--r--src/mongo/s/write_ops/batch_upconvert.cpp2
-rw-r--r--src/mongo/s/write_ops/batch_upconvert_test.cpp3
-rw-r--r--src/mongo/s/write_ops/batch_write_exec.cpp5
-rw-r--r--src/mongo/s/write_ops/batch_write_exec_test.cpp3
-rw-r--r--src/mongo/s/write_ops/batch_write_op.cpp6
-rw-r--r--src/mongo/s/write_ops/batch_write_op_test.cpp4
-rw-r--r--src/mongo/s/write_ops/batched_command_request.cpp4
-rw-r--r--src/mongo/s/write_ops/batched_command_response.cpp3
-rw-r--r--src/mongo/s/write_ops/batched_delete_document.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_delete_request.cpp3
-rw-r--r--src/mongo/s/write_ops/batched_insert_request.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_request_metadata.cpp1
-rw-r--r--src/mongo/s/write_ops/batched_update_document.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_update_request.cpp3
-rw-r--r--src/mongo/s/write_ops/batched_upsert_detail.cpp2
-rw-r--r--src/mongo/s/write_ops/config_coordinator.cpp2
-rw-r--r--src/mongo/s/write_ops/wc_error_detail.cpp2
-rw-r--r--src/mongo/s/write_ops/write_error_detail.cpp2
-rw-r--r--src/mongo/s/write_ops/write_op.cpp3
-rw-r--r--src/mongo/s/write_ops/write_op_test.cpp3
83 files changed, 313 insertions, 0 deletions
diff --git a/src/mongo/s/balance.cpp b/src/mongo/s/balance.cpp
index 6659c8e3f64..76e658b8ef6 100644
--- a/src/mongo/s/balance.cpp
+++ b/src/mongo/s/balance.cpp
@@ -62,6 +62,12 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::map;
+ using std::set;
+ using std::string;
+ using std::vector;
MONGO_FP_DECLARE(skipBalanceRound);
diff --git a/src/mongo/s/balancer_policy.cpp b/src/mongo/s/balancer_policy.cpp
index 58e0c32272a..651502d01bc 100644
--- a/src/mongo/s/balancer_policy.cpp
+++ b/src/mongo/s/balancer_policy.cpp
@@ -44,6 +44,14 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::map;
+ using std::numeric_limits;
+ using std::set;
+ using std::string;
+ using std::vector;
+
string TagRange::toString() const {
return str::stream() << min << " -->> " << max << " on " << tag;
}
diff --git a/src/mongo/s/balancer_policy_tests.cpp b/src/mongo/s/balancer_policy_tests.cpp
index 3d9a92c417f..08906b0accf 100644
--- a/src/mongo/s/balancer_policy_tests.cpp
+++ b/src/mongo/s/balancer_policy_tests.cpp
@@ -40,6 +40,12 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::map;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
namespace {
diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp
index 61a6769320f..62a19e74213 100644
--- a/src/mongo/s/chunk.cpp
+++ b/src/mongo/s/chunk.cpp
@@ -73,6 +73,18 @@
namespace mongo {
using boost::shared_ptr;
+ using std::auto_ptr;
+ using std::cout;
+ using std::endl;
+ using std::pair;
+ using std::make_pair;
+ using std::map;
+ using std::max;
+ using std::ostringstream;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
inline bool allOfType(BSONType type, const BSONObj& o) {
BSONObjIterator it(o);
diff --git a/src/mongo/s/chunk_diff-inl.cpp b/src/mongo/s/chunk_diff-inl.cpp
index e53cbf4a197..e8f7575bcf4 100644
--- a/src/mongo/s/chunk_diff-inl.cpp
+++ b/src/mongo/s/chunk_diff-inl.cpp
@@ -41,6 +41,12 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::map;
+ using std::string;
+ using std::vector;
+
template < class ValType, class ShardType >
bool ConfigDiffTracker<ValType,ShardType>::
isOverlapping( const BSONObj& min, const BSONObj& max )
diff --git a/src/mongo/s/chunk_manager_targeter.cpp b/src/mongo/s/chunk_manager_targeter.cpp
index 11945efd0fd..7ae106245e6 100644
--- a/src/mongo/s/chunk_manager_targeter.cpp
+++ b/src/mongo/s/chunk_manager_targeter.cpp
@@ -37,6 +37,12 @@
namespace mongo {
+ using std::endl;
+ using std::map;
+ using std::set;
+ using std::string;
+ using std::vector;
+
using mongoutils::str::stream;
/**
diff --git a/src/mongo/s/chunk_manager_targeter_test.cpp b/src/mongo/s/chunk_manager_targeter_test.cpp
index 8e7ee9ef9a8..30bd0589cbd 100644
--- a/src/mongo/s/chunk_manager_targeter_test.cpp
+++ b/src/mongo/s/chunk_manager_targeter_test.cpp
@@ -40,6 +40,8 @@ namespace {
using namespace mongo;
+ using std::auto_ptr;
+ using std::make_pair;
/**
* ChunkManager targeting test
*
diff --git a/src/mongo/s/client_info.cpp b/src/mongo/s/client_info.cpp
index cefcdc9a137..758b8cb5936 100644
--- a/src/mongo/s/client_info.cpp
+++ b/src/mongo/s/client_info.cpp
@@ -56,6 +56,9 @@
namespace mongo {
+ using std::string;
+ using std::stringstream;
+
ClientInfo::ClientInfo(AbstractMessagingPort* messagingPort) : ClientBasic(messagingPort) {
_cur = &_a;
_prev = &_b;
diff --git a/src/mongo/s/cluster_client_internal.cpp b/src/mongo/s/cluster_client_internal.cpp
index 5a9b7c2a0e6..b0b4fc53f81 100644
--- a/src/mongo/s/cluster_client_internal.cpp
+++ b/src/mongo/s/cluster_client_internal.cpp
@@ -49,6 +49,8 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::endl;
using std::string;
using std::vector;
using mongoutils::str::stream;
diff --git a/src/mongo/s/cluster_explain.cpp b/src/mongo/s/cluster_explain.cpp
index 595786ee39d..75b63382540 100644
--- a/src/mongo/s/cluster_explain.cpp
+++ b/src/mongo/s/cluster_explain.cpp
@@ -34,6 +34,8 @@
namespace mongo {
+ using std::vector;
+
const char* ClusterExplain::kSingleShard = "SINGLE_SHARD";
const char* ClusterExplain::kMergeFromShards = "SHARD_MERGE";
const char* ClusterExplain::kMergeSortFromShards = "SHARD_MERGE_SORT";
diff --git a/src/mongo/s/cluster_write.cpp b/src/mongo/s/cluster_write.cpp
index 62fdcce12bf..ec66e80b790 100644
--- a/src/mongo/s/cluster_write.cpp
+++ b/src/mongo/s/cluster_write.cpp
@@ -50,8 +50,12 @@
namespace mongo {
+ using std::auto_ptr;
using std::vector;
+ using std::endl;
+ using std::map;
using std::string;
+ using std::stringstream;
const int ConfigOpTimeoutMillis = 30 * 1000;
diff --git a/src/mongo/s/collection_metadata.cpp b/src/mongo/s/collection_metadata.cpp
index e4ec828caec..11663b072e4 100644
--- a/src/mongo/s/collection_metadata.cpp
+++ b/src/mongo/s/collection_metadata.cpp
@@ -36,6 +36,12 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::make_pair;
+ using std::string;
+ using std::vector;
+
using mongoutils::str::stream;
CollectionMetadata::CollectionMetadata() { }
diff --git a/src/mongo/s/commands/auth_schema_upgrade_s.cpp b/src/mongo/s/commands/auth_schema_upgrade_s.cpp
index 7ecaf85f9bd..bf6c33804a2 100644
--- a/src/mongo/s/commands/auth_schema_upgrade_s.cpp
+++ b/src/mongo/s/commands/auth_schema_upgrade_s.cpp
@@ -49,6 +49,10 @@
#include "mongo/util/log.h"
namespace mongo {
+
+ using std::endl;
+ using std::string;
+
namespace {
/**
diff --git a/src/mongo/s/commands/cluster_explain_cmd.cpp b/src/mongo/s/commands/cluster_explain_cmd.cpp
index d0b55d3e6af..ea80aa75d3b 100644
--- a/src/mongo/s/commands/cluster_explain_cmd.cpp
+++ b/src/mongo/s/commands/cluster_explain_cmd.cpp
@@ -34,6 +34,8 @@
namespace mongo {
+ using std::string;
+
static ClusterExplainCmd cmdExplainCluster;
Status ClusterExplainCmd::checkAuthForCommand(ClientBasic* client,
diff --git a/src/mongo/s/commands/cluster_find_cmd.cpp b/src/mongo/s/commands/cluster_find_cmd.cpp
index f64816d2c03..4d819207f43 100644
--- a/src/mongo/s/commands/cluster_find_cmd.cpp
+++ b/src/mongo/s/commands/cluster_find_cmd.cpp
@@ -37,6 +37,10 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::string;
+ using std::vector;
+
static ClusterFindCmd cmdFindCluster;
Status ClusterFindCmd::checkAuthForCommand(ClientBasic* client,
diff --git a/src/mongo/s/commands/cluster_index_filter_cmd.cpp b/src/mongo/s/commands/cluster_index_filter_cmd.cpp
index c454e2bc385..c66e2802db9 100644
--- a/src/mongo/s/commands/cluster_index_filter_cmd.cpp
+++ b/src/mongo/s/commands/cluster_index_filter_cmd.cpp
@@ -40,6 +40,7 @@
namespace mongo {
using std::string;
+ using std::stringstream;
using std::vector;
/**
diff --git a/src/mongo/s/commands/cluster_merge_chunks_cmd.cpp b/src/mongo/s/commands/cluster_merge_chunks_cmd.cpp
index 57bca2b1fb5..5e872b5a80c 100644
--- a/src/mongo/s/commands/cluster_merge_chunks_cmd.cpp
+++ b/src/mongo/s/commands/cluster_merge_chunks_cmd.cpp
@@ -40,6 +40,10 @@
namespace mongo {
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
/**
* Mongos-side command for merging chunks, passes command to appropriate shard.
*/
diff --git a/src/mongo/s/commands/cluster_plan_cache_cmd.cpp b/src/mongo/s/commands/cluster_plan_cache_cmd.cpp
index 5bd87f4eb8a..bd22961aa71 100644
--- a/src/mongo/s/commands/cluster_plan_cache_cmd.cpp
+++ b/src/mongo/s/commands/cluster_plan_cache_cmd.cpp
@@ -40,6 +40,7 @@
namespace mongo {
using std::string;
+ using std::stringstream;
using std::vector;
/**
diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp
index e25089e7413..940cc1bc5da 100644
--- a/src/mongo/s/commands/cluster_write_cmd.cpp
+++ b/src/mongo/s/commands/cluster_write_cmd.cpp
@@ -46,6 +46,10 @@
namespace mongo {
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
/**
* Base class for mongos write commands. Cluster write commands support batch writes and write
* concern, and return per-item error information. All cluster write commands use the entry
diff --git a/src/mongo/s/commands_admin.cpp b/src/mongo/s/commands_admin.cpp
index 129e0039c6e..01d760ce407 100644
--- a/src/mongo/s/commands_admin.cpp
+++ b/src/mongo/s/commands_admin.cpp
@@ -84,6 +84,14 @@ namespace mongo {
using boost::scoped_ptr;
using boost::shared_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::list;
+ using std::map;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
namespace dbgrid_cmds {
diff --git a/src/mongo/s/commands_public.cpp b/src/mongo/s/commands_public.cpp
index 2b78a284e12..a0fd5392f80 100644
--- a/src/mongo/s/commands_public.cpp
+++ b/src/mongo/s/commands_public.cpp
@@ -76,6 +76,15 @@ namespace mongo {
using boost::intrusive_ptr;
using boost::scoped_ptr;
using boost::shared_ptr;
+ using std::endl;
+ using std::list;
+ using std::make_pair;
+ using std::map;
+ using std::multimap;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
namespace dbgrid_pub_cmds {
diff --git a/src/mongo/s/config.cpp b/src/mongo/s/config.cpp
index 9df7a847808..79e37898bc8 100644
--- a/src/mongo/s/config.cpp
+++ b/src/mongo/s/config.cpp
@@ -62,6 +62,12 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::pair;
+ using std::set;
+ using std::stringstream;
+ using std::vector;
int ConfigServer::VERSION = 3;
Shard Shard::EMPTY;
diff --git a/src/mongo/s/config_upgrade.cpp b/src/mongo/s/config_upgrade.cpp
index ff79ce482e2..58e0a239d0d 100644
--- a/src/mongo/s/config_upgrade.cpp
+++ b/src/mongo/s/config_upgrade.cpp
@@ -49,6 +49,12 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::endl;
+ using std::make_pair;
+ using std::map;
+ using std::string;
+ using std::vector;
+
using mongoutils::str::stream;
//
diff --git a/src/mongo/s/config_upgrade_helpers.cpp b/src/mongo/s/config_upgrade_helpers.cpp
index b678052c7b1..8c5e10fd18c 100644
--- a/src/mongo/s/config_upgrade_helpers.cpp
+++ b/src/mongo/s/config_upgrade_helpers.cpp
@@ -45,6 +45,10 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::string;
+
using mongoutils::str::stream;
// Custom field used in upgrade state to determine if/where we failed on last upgrade
diff --git a/src/mongo/s/config_upgrade_v0_to_v6.cpp b/src/mongo/s/config_upgrade_v0_to_v6.cpp
index c928f9d7fa0..e27b85eebc8 100644
--- a/src/mongo/s/config_upgrade_v0_to_v6.cpp
+++ b/src/mongo/s/config_upgrade_v0_to_v6.cpp
@@ -40,6 +40,9 @@
namespace mongo {
+ using std::endl;
+ using std::string;
+
using mongo::str::stream;
/**
diff --git a/src/mongo/s/config_upgrade_v5_to_v6.cpp b/src/mongo/s/config_upgrade_v5_to_v6.cpp
index 4559cfa1f1e..7f3cda8dfa2 100644
--- a/src/mongo/s/config_upgrade_v5_to_v6.cpp
+++ b/src/mongo/s/config_upgrade_v5_to_v6.cpp
@@ -34,6 +34,8 @@
namespace mongo {
+ using std::string;
+
static const char* minMongoProcessVersion = "2.6";
static const char* cannotCleanupMessage =
diff --git a/src/mongo/s/cursors.cpp b/src/mongo/s/cursors.cpp
index 4e71c0a6ac9..0f2e97866f9 100644
--- a/src/mongo/s/cursors.cpp
+++ b/src/mongo/s/cursors.cpp
@@ -55,6 +55,9 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::endl;
+ using std::string;
+ using std::stringstream;
const int ShardedClientCursor::INIT_REPLY_BUFFER_SIZE = 32768;
diff --git a/src/mongo/s/d_merge.cpp b/src/mongo/s/d_merge.cpp
index 87682902f8e..cf59ffafa11 100644
--- a/src/mongo/s/d_merge.cpp
+++ b/src/mongo/s/d_merge.cpp
@@ -41,6 +41,8 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
using std::string;
using mongoutils::str::stream;
diff --git a/src/mongo/s/d_split.cpp b/src/mongo/s/d_split.cpp
index c984f8c350f..56d59e4ffd1 100644
--- a/src/mongo/s/d_split.cpp
+++ b/src/mongo/s/d_split.cpp
@@ -62,6 +62,14 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::ostringstream;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
class CmdMedianKey : public Command {
public:
CmdMedianKey() : Command( "medianKey" ) {}
diff --git a/src/mongo/s/d_state.cpp b/src/mongo/s/d_state.cpp
index 88aee91fa74..4e60b4b2aeb 100644
--- a/src/mongo/s/d_state.cpp
+++ b/src/mongo/s/d_state.cpp
@@ -68,6 +68,11 @@
namespace mongo {
+ using std::endl;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
// -----ShardingState START ----
ShardingState::ShardingState()
diff --git a/src/mongo/s/dbclient_multi_command.cpp b/src/mongo/s/dbclient_multi_command.cpp
index 286789e2c0d..8454b99067c 100644
--- a/src/mongo/s/dbclient_multi_command.cpp
+++ b/src/mongo/s/dbclient_multi_command.cpp
@@ -43,6 +43,8 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::deque;
+ using std::string;
DBClientMultiCommand::PendingCommand::PendingCommand( const ConnectionString& endpoint,
const StringData& dbName,
diff --git a/src/mongo/s/dbclient_shard_resolver.cpp b/src/mongo/s/dbclient_shard_resolver.cpp
index c3ed6da660f..9b86d5f0c6d 100644
--- a/src/mongo/s/dbclient_shard_resolver.cpp
+++ b/src/mongo/s/dbclient_shard_resolver.cpp
@@ -36,6 +36,8 @@
namespace mongo {
+ using std::string;
+
Status DBClientShardResolver::chooseWriteHost( const string& shardName,
ConnectionString* shardHost ) const {
diff --git a/src/mongo/s/default_version.cpp b/src/mongo/s/default_version.cpp
index 03422e94995..fd9657a76ac 100644
--- a/src/mongo/s/default_version.cpp
+++ b/src/mongo/s/default_version.cpp
@@ -37,6 +37,8 @@
namespace mongo {
+ using std::string;
+
// Global version manager
VersionManager versionManager;
diff --git a/src/mongo/s/distlock.cpp b/src/mongo/s/distlock.cpp
index 0fcb83de97c..02a60a34fd1 100644
--- a/src/mongo/s/distlock.cpp
+++ b/src/mongo/s/distlock.cpp
@@ -46,6 +46,13 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::list;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
LabeledLevel DistributedLock::logLvl( 1 );
DistributedLock::LastPings DistributedLock::lastPings;
diff --git a/src/mongo/s/distlock_test.cpp b/src/mongo/s/distlock_test.cpp
index f8fe2c10edf..21e9711c4a3 100644
--- a/src/mongo/s/distlock_test.cpp
+++ b/src/mongo/s/distlock_test.cpp
@@ -77,6 +77,10 @@
namespace mongo {
using boost::shared_ptr;
+ using std::endl;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
class TestDistLockWithSync: public Command {
public:
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index 2701efefb2c..53873173070 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -57,6 +57,16 @@
namespace mongo {
+ using std::endl;
+ using std::istringstream;
+ using std::map;
+ using std::ostringstream;
+ using std::set;
+ using std::setfill;
+ using std::setw;
+ using std::stringstream;
+ using std::vector;
+
MONGO_FP_DECLARE(neverBalance);
DBConfigPtr Grid::getDBConfig( const StringData& ns , bool create , const string& shardNameHint ) {
diff --git a/src/mongo/s/metadata_loader.cpp b/src/mongo/s/metadata_loader.cpp
index ad4837ecb21..d09d51cd5f8 100644
--- a/src/mongo/s/metadata_loader.cpp
+++ b/src/mongo/s/metadata_loader.cpp
@@ -45,6 +45,11 @@
namespace mongo {
+ using std::make_pair;
+ using std::map;
+ using std::pair;
+ using std::string;
+
/**
* This is an adapter so we can use config diffs - mongos and mongod do them slightly
* differently.
diff --git a/src/mongo/s/mongos_options.cpp b/src/mongo/s/mongos_options.cpp
index f2cb244009d..b84cd44365f 100644
--- a/src/mongo/s/mongos_options.cpp
+++ b/src/mongo/s/mongos_options.cpp
@@ -50,6 +50,8 @@
namespace mongo {
+ using std::endl;
+
MongosGlobalParams mongosGlobalParams;
Status addMongosOptions(moe::OptionSection* options) {
diff --git a/src/mongo/s/multi_host_query.cpp b/src/mongo/s/multi_host_query.cpp
index d62f63e098c..451b764cde4 100644
--- a/src/mongo/s/multi_host_query.cpp
+++ b/src/mongo/s/multi_host_query.cpp
@@ -37,6 +37,10 @@
namespace mongo {
using boost::shared_ptr;
+ using std::make_pair;
+ using std::string;
+ using std::vector;
+
typedef boost::unique_lock<boost::mutex> boost_unique_lock;
HostThreadPool::HostThreadPool(int poolSize, bool scopeAllWork) :
diff --git a/src/mongo/s/multi_host_query_test.cpp b/src/mongo/s/multi_host_query_test.cpp
index e2dde9b3619..5c98bb0519e 100644
--- a/src/mongo/s/multi_host_query_test.cpp
+++ b/src/mongo/s/multi_host_query_test.cpp
@@ -39,7 +39,10 @@ namespace {
using namespace mongo;
using boost::scoped_ptr;
using boost::shared_ptr;
+ using std::make_pair;
using std::map;
+ using std::string;
+ using std::vector;
class CallbackCheck {
public:
diff --git a/src/mongo/s/request.cpp b/src/mongo/s/request.cpp
index 9926f5316a2..ac2a6781eae 100644
--- a/src/mongo/s/request.cpp
+++ b/src/mongo/s/request.cpp
@@ -50,6 +50,9 @@
namespace mongo {
+ using std::endl;
+ using std::string;
+
Request::Request( Message& m, AbstractMessagingPort* p ) :
_m(m) , _d( m ) , _p(p) , _didInit(false) {
diff --git a/src/mongo/s/s_only.cpp b/src/mongo/s/s_only.cpp
index cfd590f03b7..e203cf23e6e 100644
--- a/src/mongo/s/s_only.cpp
+++ b/src/mongo/s/s_only.cpp
@@ -54,6 +54,10 @@
*/
namespace mongo {
+ using std::endl;
+ using std::string;
+ using std::stringstream;
+
void* remapPrivateView(void *oldPrivateAddr) {
log() << "remapPrivateView called in mongos, aborting" << endl;
fassertFailed(16462);
diff --git a/src/mongo/s/scc_fast_query_handler.cpp b/src/mongo/s/scc_fast_query_handler.cpp
index c83017f46ef..0db1a4e4ad4 100644
--- a/src/mongo/s/scc_fast_query_handler.cpp
+++ b/src/mongo/s/scc_fast_query_handler.cpp
@@ -43,6 +43,11 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::string;
+ using std::vector;
+
/**
* This parameter turns on fastest config reads for auth data only - *.system.users collections
* and the "usersInfo" command. This should be enough to prevent a non-responsive config from
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 8070e430177..491ac90eaa6 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -95,6 +95,11 @@
namespace mongo {
+ using std::cout;
+ using std::endl;
+ using std::string;
+ using std::vector;
+
using logger::LogComponent;
#if defined(_WIN32)
diff --git a/src/mongo/s/shard.cpp b/src/mongo/s/shard.cpp
index 43bcb57c0a9..1eb082b7898 100644
--- a/src/mongo/s/shard.cpp
+++ b/src/mongo/s/shard.cpp
@@ -60,6 +60,15 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::list;
+ using std::map;
+ using std::ostream;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
static bool initWireVersion( DBClientBase* conn, std::string* errMsg ) {
BSONObj response;
if ( !conn->runCommand( "admin", BSON("isMaster" << 1), response )) {
diff --git a/src/mongo/s/shard_key_pattern.cpp b/src/mongo/s/shard_key_pattern.cpp
index 3f753a0e3ba..f413be24efa 100644
--- a/src/mongo/s/shard_key_pattern.cpp
+++ b/src/mongo/s/shard_key_pattern.cpp
@@ -48,6 +48,8 @@ namespace mongo {
using std::pair;
using std::make_pair;
using std::vector;
+ using std::string;
+
using pathsupport::EqualityMatches;
using mongoutils::str::stream;
diff --git a/src/mongo/s/shard_key_pattern_test.cpp b/src/mongo/s/shard_key_pattern_test.cpp
index 7410cc3dd60..c90e313ce26 100644
--- a/src/mongo/s/shard_key_pattern_test.cpp
+++ b/src/mongo/s/shard_key_pattern_test.cpp
@@ -33,6 +33,8 @@
namespace {
+ using std::string;
+
using namespace mongo;
TEST(ShardKeyPattern, ValidShardKeyPatternSingle) {
diff --git a/src/mongo/s/shardconnection.cpp b/src/mongo/s/shardconnection.cpp
index 2ba89122092..1500553a60a 100644
--- a/src/mongo/s/shardconnection.cpp
+++ b/src/mongo/s/shardconnection.cpp
@@ -56,6 +56,14 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::map;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
DBConnectionPool shardConnectionPool;
class ClientConnections;
diff --git a/src/mongo/s/strategy.cpp b/src/mongo/s/strategy.cpp
index 9d2af5515f1..8b80c304c76 100644
--- a/src/mongo/s/strategy.cpp
+++ b/src/mongo/s/strategy.cpp
@@ -72,6 +72,11 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::endl;
+ using std::set;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
static bool _isSystemIndexes( const char* ns ) {
return nsToCollectionSubstring(ns) == "system.indexes";
diff --git a/src/mongo/s/type_actionlog.cpp b/src/mongo/s/type_actionlog.cpp
index 0b4e7303a92..be661ac5a27 100644
--- a/src/mongo/s/type_actionlog.cpp
+++ b/src/mongo/s/type_actionlog.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongo::str::stream;
const std::string ActionLogType::ConfigNS = "config.actionlog";
diff --git a/src/mongo/s/type_changelog.cpp b/src/mongo/s/type_changelog.cpp
index 7dc3ded0ffe..b4e68dba532 100644
--- a/src/mongo/s/type_changelog.cpp
+++ b/src/mongo/s/type_changelog.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string ChangelogType::ConfigNS = "config.changelog";
diff --git a/src/mongo/s/type_chunk.cpp b/src/mongo/s/type_chunk.cpp
index fc592cb7b8a..4a1c1f9b3cd 100644
--- a/src/mongo/s/type_chunk.cpp
+++ b/src/mongo/s/type_chunk.cpp
@@ -34,6 +34,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string ChunkType::ConfigNS = "config.chunks";
diff --git a/src/mongo/s/type_collection.cpp b/src/mongo/s/type_collection.cpp
index 59013b17716..7665b36b9be 100644
--- a/src/mongo/s/type_collection.cpp
+++ b/src/mongo/s/type_collection.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string CollectionType::ConfigNS = "config.collections";
diff --git a/src/mongo/s/type_config_version.cpp b/src/mongo/s/type_config_version.cpp
index 4d7418f98b3..8f9c47f8d77 100644
--- a/src/mongo/s/type_config_version.cpp
+++ b/src/mongo/s/type_config_version.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string VersionType::ConfigNS = "config.version";
diff --git a/src/mongo/s/type_database.cpp b/src/mongo/s/type_database.cpp
index e329caaed6c..cae63e92028 100644
--- a/src/mongo/s/type_database.cpp
+++ b/src/mongo/s/type_database.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string DatabaseType::ConfigNS = "config.databases";
diff --git a/src/mongo/s/type_lockpings.cpp b/src/mongo/s/type_lockpings.cpp
index 9752dbf70e5..853a76dd010 100644
--- a/src/mongo/s/type_lockpings.cpp
+++ b/src/mongo/s/type_lockpings.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string LockpingsType::ConfigNS = "config.lockpings";
diff --git a/src/mongo/s/type_locks.cpp b/src/mongo/s/type_locks.cpp
index 68f79b0e465..309b2efd89a 100644
--- a/src/mongo/s/type_locks.cpp
+++ b/src/mongo/s/type_locks.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string LocksType::ConfigNS = "config.locks";
diff --git a/src/mongo/s/type_mongos.cpp b/src/mongo/s/type_mongos.cpp
index 1dfc425ddad..0ff363cbc86 100644
--- a/src/mongo/s/type_mongos.cpp
+++ b/src/mongo/s/type_mongos.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string MongosType::ConfigNS = "config.mongos";
diff --git a/src/mongo/s/type_settings.cpp b/src/mongo/s/type_settings.cpp
index 2c2f12bc7bd..dc6f0deca50 100644
--- a/src/mongo/s/type_settings.cpp
+++ b/src/mongo/s/type_settings.cpp
@@ -34,6 +34,9 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::string;
+
using mongoutils::str::stream;
const std::string SettingsType::ConfigNS = "config.settings";
diff --git a/src/mongo/s/type_shard.cpp b/src/mongo/s/type_shard.cpp
index 2b9a4012696..5e38406a2fe 100644
--- a/src/mongo/s/type_shard.cpp
+++ b/src/mongo/s/type_shard.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string ShardType::ConfigNS = "config.shards";
diff --git a/src/mongo/s/type_tags.cpp b/src/mongo/s/type_tags.cpp
index 15f72ed9208..a312052a72b 100644
--- a/src/mongo/s/type_tags.cpp
+++ b/src/mongo/s/type_tags.cpp
@@ -32,6 +32,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string TagsType::ConfigNS = "config.tags";
diff --git a/src/mongo/s/version_manager.cpp b/src/mongo/s/version_manager.cpp
index 98b9d62ae34..7e8d34091e8 100644
--- a/src/mongo/s/version_manager.cpp
+++ b/src/mongo/s/version_manager.cpp
@@ -44,6 +44,10 @@
namespace mongo {
+ using std::endl;
+ using std::map;
+ using std::string;
+
// Global version manager
VersionManager versionManager;
diff --git a/src/mongo/s/write_ops/batch_downconvert.cpp b/src/mongo/s/write_ops/batch_downconvert.cpp
index 24958bce2e6..b6ca7bc6c44 100644
--- a/src/mongo/s/write_ops/batch_downconvert.cpp
+++ b/src/mongo/s/write_ops/batch_downconvert.cpp
@@ -39,6 +39,10 @@
namespace mongo {
+ using std::endl;
+ using std::string;
+ using std::vector;
+
Status extractGLEErrors( const BSONObj& gleResponse, GLEErrors* errors ) {
// DRAGONS
diff --git a/src/mongo/s/write_ops/batch_upconvert.cpp b/src/mongo/s/write_ops/batch_upconvert.cpp
index abe12d9d7af..cdfd915fa33 100644
--- a/src/mongo/s/write_ops/batch_upconvert.cpp
+++ b/src/mongo/s/write_ops/batch_upconvert.cpp
@@ -44,6 +44,8 @@ namespace mongo {
using boost::scoped_ptr;
using mongoutils::str::stream;
+ using std::auto_ptr;
+ using std::string;
using std::vector;
void msgToBatchRequests( const Message& msg, vector<BatchedCommandRequest*>* requests ) {
diff --git a/src/mongo/s/write_ops/batch_upconvert_test.cpp b/src/mongo/s/write_ops/batch_upconvert_test.cpp
index 5b8da5293f2..12c60982da1 100644
--- a/src/mongo/s/write_ops/batch_upconvert_test.cpp
+++ b/src/mongo/s/write_ops/batch_upconvert_test.cpp
@@ -40,6 +40,9 @@
namespace {
+ using std::string;
+ using std::vector;
+
using namespace mongo;
TEST(WriteBatchUpconvert, BasicInsert) {
diff --git a/src/mongo/s/write_ops/batch_write_exec.cpp b/src/mongo/s/write_ops/batch_write_exec.cpp
index 1cd9c86446f..b46c70b1426 100644
--- a/src/mongo/s/write_ops/batch_write_exec.cpp
+++ b/src/mongo/s/write_ops/batch_write_exec.cpp
@@ -43,6 +43,11 @@
namespace mongo {
+ using std::endl;
+ using std::make_pair;
+ using std::stringstream;
+ using std::vector;
+
BatchWriteExec::BatchWriteExec( NSTargeter* targeter,
ShardResolver* resolver,
MultiCommandDispatch* dispatcher ) :
diff --git a/src/mongo/s/write_ops/batch_write_exec_test.cpp b/src/mongo/s/write_ops/batch_write_exec_test.cpp
index b0e069fd796..278d2bf4f8d 100644
--- a/src/mongo/s/write_ops/batch_write_exec_test.cpp
+++ b/src/mongo/s/write_ops/batch_write_exec_test.cpp
@@ -41,6 +41,9 @@
namespace {
using boost::scoped_ptr;
+ using std::string;
+ using std::vector;
+
using namespace mongo;
/**
diff --git a/src/mongo/s/write_ops/batch_write_op.cpp b/src/mongo/s/write_ops/batch_write_op.cpp
index 15de4a1fd6b..d695d93afb9 100644
--- a/src/mongo/s/write_ops/batch_write_op.cpp
+++ b/src/mongo/s/write_ops/batch_write_op.cpp
@@ -32,6 +32,12 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::make_pair;
+ using std::set;
+ using std::stringstream;
+ using std::vector;
+
/**
* Returns a new write concern that has the copy of every field from the original
* document but with a w set to 1. This is intended for upgrading { w: 0 } write
diff --git a/src/mongo/s/write_ops/batch_write_op_test.cpp b/src/mongo/s/write_ops/batch_write_op_test.cpp
index 7170b6f5ce7..4c55036627c 100644
--- a/src/mongo/s/write_ops/batch_write_op_test.cpp
+++ b/src/mongo/s/write_ops/batch_write_op_test.cpp
@@ -37,6 +37,10 @@
namespace {
+ using std::auto_ptr;
+ using std::string;
+ using std::vector;
+
using namespace mongo;
static void initTargeterFullRange( const NamespaceString& nss,
diff --git a/src/mongo/s/write_ops/batched_command_request.cpp b/src/mongo/s/write_ops/batched_command_request.cpp
index 4c3065a2643..bbf8dee717a 100644
--- a/src/mongo/s/write_ops/batched_command_request.cpp
+++ b/src/mongo/s/write_ops/batched_command_request.cpp
@@ -33,6 +33,10 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::string;
+ using std::vector;
+
const size_t BatchedCommandRequest::kMaxWriteBatchSize = 1000;
BatchedCommandRequest::BatchedCommandRequest( BatchType batchType ) :
diff --git a/src/mongo/s/write_ops/batched_command_response.cpp b/src/mongo/s/write_ops/batched_command_response.cpp
index 42f2b2f22d3..3928e1b4812 100644
--- a/src/mongo/s/write_ops/batched_command_response.cpp
+++ b/src/mongo/s/write_ops/batched_command_response.cpp
@@ -33,6 +33,9 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::string;
+
using mongoutils::str::stream;
const BSONField<int> BatchedCommandResponse::ok("ok");
diff --git a/src/mongo/s/write_ops/batched_delete_document.cpp b/src/mongo/s/write_ops/batched_delete_document.cpp
index ace1611d77b..e12e5ad7a86 100644
--- a/src/mongo/s/write_ops/batched_delete_document.cpp
+++ b/src/mongo/s/write_ops/batched_delete_document.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const BSONField<BSONObj> BatchedDeleteDocument::query("q");
const BSONField<int> BatchedDeleteDocument::limit("limit");
diff --git a/src/mongo/s/write_ops/batched_delete_request.cpp b/src/mongo/s/write_ops/batched_delete_request.cpp
index d17dfc03a1e..eea7820d76e 100644
--- a/src/mongo/s/write_ops/batched_delete_request.cpp
+++ b/src/mongo/s/write_ops/batched_delete_request.cpp
@@ -33,6 +33,9 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::string;
+
using mongoutils::str::stream;
const std::string BatchedDeleteRequest::BATCHED_DELETE_REQUEST = "delete";
diff --git a/src/mongo/s/write_ops/batched_insert_request.cpp b/src/mongo/s/write_ops/batched_insert_request.cpp
index 308298bef6f..7236b4418e5 100644
--- a/src/mongo/s/write_ops/batched_insert_request.cpp
+++ b/src/mongo/s/write_ops/batched_insert_request.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const std::string BatchedInsertRequest::BATCHED_INSERT_REQUEST = "insert";
diff --git a/src/mongo/s/write_ops/batched_request_metadata.cpp b/src/mongo/s/write_ops/batched_request_metadata.cpp
index 63b51e4ab95..cdd6ae55ffe 100644
--- a/src/mongo/s/write_ops/batched_request_metadata.cpp
+++ b/src/mongo/s/write_ops/batched_request_metadata.cpp
@@ -32,6 +32,7 @@
namespace mongo {
+ using std::auto_ptr;
using std::string;
const BSONField<string> BatchedRequestMetadata::shardName("shardName");
diff --git a/src/mongo/s/write_ops/batched_update_document.cpp b/src/mongo/s/write_ops/batched_update_document.cpp
index 792592df29f..ffebede8787 100644
--- a/src/mongo/s/write_ops/batched_update_document.cpp
+++ b/src/mongo/s/write_ops/batched_update_document.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const BSONField<BSONObj> BatchedUpdateDocument::query("q");
diff --git a/src/mongo/s/write_ops/batched_update_request.cpp b/src/mongo/s/write_ops/batched_update_request.cpp
index 5fe1ecb0978..fbb12af2038 100644
--- a/src/mongo/s/write_ops/batched_update_request.cpp
+++ b/src/mongo/s/write_ops/batched_update_request.cpp
@@ -33,6 +33,9 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::string;
+
using mongoutils::str::stream;
const std::string BatchedUpdateRequest::BATCHED_UPDATE_REQUEST = "update";
diff --git a/src/mongo/s/write_ops/batched_upsert_detail.cpp b/src/mongo/s/write_ops/batched_upsert_detail.cpp
index b753c99a180..d6764a22c39 100644
--- a/src/mongo/s/write_ops/batched_upsert_detail.cpp
+++ b/src/mongo/s/write_ops/batched_upsert_detail.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const BSONField<int> BatchedUpsertDetail::index("index");
diff --git a/src/mongo/s/write_ops/config_coordinator.cpp b/src/mongo/s/write_ops/config_coordinator.cpp
index 131ac1ca980..ca36cbe1562 100644
--- a/src/mongo/s/write_ops/config_coordinator.cpp
+++ b/src/mongo/s/write_ops/config_coordinator.cpp
@@ -39,6 +39,8 @@
namespace mongo {
+ using std::string;
+ using std::vector;
ConfigCoordinator::ConfigCoordinator( MultiCommandDispatch* dispatcher,
const vector<ConnectionString>& configHosts ) :
diff --git a/src/mongo/s/write_ops/wc_error_detail.cpp b/src/mongo/s/write_ops/wc_error_detail.cpp
index bc6d6cf7f2e..04dde3a8346 100644
--- a/src/mongo/s/write_ops/wc_error_detail.cpp
+++ b/src/mongo/s/write_ops/wc_error_detail.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const BSONField<int> WCErrorDetail::errCode("code");
const BSONField<BSONObj> WCErrorDetail::errInfo("errInfo");
diff --git a/src/mongo/s/write_ops/write_error_detail.cpp b/src/mongo/s/write_ops/write_error_detail.cpp
index c9f323e2d97..65f949b411c 100644
--- a/src/mongo/s/write_ops/write_error_detail.cpp
+++ b/src/mongo/s/write_ops/write_error_detail.cpp
@@ -33,6 +33,8 @@
namespace mongo {
+ using std::string;
+
using mongoutils::str::stream;
const BSONField<int> WriteErrorDetail::index("index");
const BSONField<int> WriteErrorDetail::errCode("code");
diff --git a/src/mongo/s/write_ops/write_op.cpp b/src/mongo/s/write_ops/write_op.cpp
index f8097154ce2..9532922237f 100644
--- a/src/mongo/s/write_ops/write_op.cpp
+++ b/src/mongo/s/write_ops/write_op.cpp
@@ -34,6 +34,9 @@
namespace mongo {
+ using std::stringstream;
+ using std::vector;
+
static void clear( vector<ChildWriteOp*>* childOps ) {
for ( vector<ChildWriteOp*>::const_iterator it = childOps->begin(); it != childOps->end();
++it ) {
diff --git a/src/mongo/s/write_ops/write_op_test.cpp b/src/mongo/s/write_ops/write_op_test.cpp
index 5559b49d3ec..669220c6d24 100644
--- a/src/mongo/s/write_ops/write_op_test.cpp
+++ b/src/mongo/s/write_ops/write_op_test.cpp
@@ -41,6 +41,9 @@
namespace {
using boost::scoped_ptr;
+ using std::string;
+ using std::vector;
+
using namespace mongo;
WriteErrorDetail* buildError( int code, const BSONObj& info, const string& message ) {