diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-04-19 16:55:16 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-04-19 16:55:16 -0400 |
commit | 8afdf52bada2f435c9be70712e2589ee819b0b82 (patch) | |
tree | 79b4409936c8286c0cc2f46cbfac743380427a09 /s/strategy.cpp | |
parent | 00bd05e7506de1639e117a76cad0a5cd41ec5b8d (diff) | |
download | mongo-8afdf52bada2f435c9be70712e2589ee819b0b82.tar.gz |
Shard abstraction
Diffstat (limited to 's/strategy.cpp')
-rw-r--r-- | s/strategy.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/s/strategy.cpp b/s/strategy.cpp index b7277e3190c..80f5420d871 100644 --- a/s/strategy.cpp +++ b/s/strategy.cpp @@ -28,7 +28,7 @@ namespace mongo { // ----- Strategy ------ void Strategy::doWrite( int op , Request& r , string server ){ - ScopedDbConnection dbcon( server ); + ShardConnection dbcon( server ); DBClientBase &_c = dbcon.conn(); /* TODO FIX - do not case and call DBClientBase::say() */ @@ -40,7 +40,7 @@ namespace mongo { void Strategy::doQuery( Request& r , string server ){ try{ - ScopedDbConnection dbcon( server ); + ShardConnection dbcon( server ); DBClientBase &c = dbcon.conn(); checkShardVersion( c , r.getns() ); @@ -69,7 +69,7 @@ namespace mongo { } void Strategy::insert( string server , const char * ns , const BSONObj& obj ){ - ScopedDbConnection dbcon( server ); + ShardConnection dbcon( server ); checkShardVersion( dbcon.conn() , ns ); dbcon->insert( ns , obj ); dbcon.done(); @@ -88,7 +88,7 @@ namespace mongo { int secsToSleep = 0; while ( 1 ){ try { - ScopedDbConnection conn( _addr ); + ShardConnection conn( _addr ); BSONObj result; @@ -220,7 +220,7 @@ namespace mongo { } bool lockNamespaceOnServer( const string& server , const string& ns ){ - ScopedDbConnection conn( server ); + ShardConnection conn( server ); bool res = lockNamespaceOnServer( conn.conn() , ns ); conn.done(); return res; |