summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-03-25 09:34:33 -0400
committerEliot Horowitz <eliot@10gen.com>2012-03-25 09:34:33 -0400
commit8de42a1889738c87fa186af5aec941feea57152a (patch)
tree613a0f28f422c2c045d22b9bbc8720ae1ff1fb87 /src
parent6b9742a730f5cf53a33cac8a45178ed2660af985 (diff)
downloadmongo-8de42a1889738c87fa186af5aec941feea57152a.tar.gz
SERVER-5394 use ScopedDbConnection instead of ShardConnection when connecting to config server
Diffstat (limited to 'src')
-rw-r--r--src/mongo/s/grid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index 031044cc652..549d1e390a9 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -349,7 +349,7 @@ namespace mongo {
}
bool Grid::knowAboutShard( const string& name ) const {
- ShardConnection conn( configServer.getPrimary() , "" );
+ ScopedDbConnection conn( configServer.getPrimary() );
BSONObj shard = conn->findOne( ShardNS::shard , BSON( "host" << name ) );
conn.done();
return ! shard.isEmpty();
@@ -361,7 +361,7 @@ namespace mongo {
bool ok = false;
int count = 0;
- ShardConnection conn( configServer.getPrimary() , "" );
+ ScopedDbConnection conn( configServer.getPrimary() );
BSONObj o = conn->findOne( ShardNS::shard , Query( fromjson ( "{_id: /^shard/}" ) ).sort( BSON( "_id" << -1 ) ) );
if ( ! o.isEmpty() ) {
string last = o["_id"].String();
@@ -386,7 +386,7 @@ namespace mongo {
*/
bool Grid::shouldBalance( const string& ns ) const {
- ShardConnection conn( configServer.getPrimary() , "" );
+ ScopedDbConnection conn( configServer.getPrimary() );
BSONObj balancerDoc;
BSONObj collDoc;