summaryrefslogtreecommitdiff
path: root/src/mongo/db/conn_pool_options.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/conn_pool_options.cpp
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/conn_pool_options.cpp')
-rw-r--r--src/mongo/db/conn_pool_options.cpp58
1 files changed, 28 insertions, 30 deletions
diff --git a/src/mongo/db/conn_pool_options.cpp b/src/mongo/db/conn_pool_options.cpp
index 5fd4c1ffb9d..71cb840cd7e 100644
--- a/src/mongo/db/conn_pool_options.cpp
+++ b/src/mongo/db/conn_pool_options.cpp
@@ -38,41 +38,39 @@
namespace mongo {
- int ConnPoolOptions::maxConnsPerHost(200);
- int ConnPoolOptions::maxShardedConnsPerHost(200);
+int ConnPoolOptions::maxConnsPerHost(200);
+int ConnPoolOptions::maxShardedConnsPerHost(200);
- namespace {
+namespace {
- ExportedServerParameter<int> //
- maxConnsPerHostParameter(ServerParameterSet::getGlobal(),
- "connPoolMaxConnsPerHost",
- &ConnPoolOptions::maxConnsPerHost,
- true,
- false /* can't change at runtime */);
+ExportedServerParameter<int> //
+ maxConnsPerHostParameter(ServerParameterSet::getGlobal(),
+ "connPoolMaxConnsPerHost",
+ &ConnPoolOptions::maxConnsPerHost,
+ true,
+ false /* can't change at runtime */);
- ExportedServerParameter<int> //
- maxShardedConnsPerHostParameter(ServerParameterSet::getGlobal(),
- "connPoolMaxShardedConnsPerHost",
- &ConnPoolOptions::maxShardedConnsPerHost,
- true,
- false /* can't change at runtime */);
+ExportedServerParameter<int> //
+ maxShardedConnsPerHostParameter(ServerParameterSet::getGlobal(),
+ "connPoolMaxShardedConnsPerHost",
+ &ConnPoolOptions::maxShardedConnsPerHost,
+ true,
+ false /* can't change at runtime */);
- MONGO_INITIALIZER(InitializeConnectionPools)(InitializerContext* context) {
+MONGO_INITIALIZER(InitializeConnectionPools)(InitializerContext* context) {
+ // Initialize the sharded and unsharded outgoing connection pools
+ // NOTES:
+ // - All mongods and mongoses have both pools
+ // - The connection hooks for sharding are added on startup (mongos) or on first sharded
+ // operation (mongod)
- // Initialize the sharded and unsharded outgoing connection pools
- // NOTES:
- // - All mongods and mongoses have both pools
- // - The connection hooks for sharding are added on startup (mongos) or on first sharded
- // operation (mongod)
+ globalConnPool.setName("connection pool");
+ globalConnPool.setMaxPoolSize(ConnPoolOptions::maxConnsPerHost);
- globalConnPool.setName("connection pool");
- globalConnPool.setMaxPoolSize(ConnPoolOptions::maxConnsPerHost);
-
- shardConnectionPool.setName("sharded connection pool");
- shardConnectionPool.setMaxPoolSize(ConnPoolOptions::maxShardedConnsPerHost);
-
- return Status::OK();
- }
- }
+ shardConnectionPool.setName("sharded connection pool");
+ shardConnectionPool.setMaxPoolSize(ConnPoolOptions::maxShardedConnsPerHost);
+ return Status::OK();
+}
+}
}