summaryrefslogtreecommitdiff
path: root/s/strategy.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-05-19 17:01:09 -0400
committerEliot Horowitz <eliot@10gen.com>2010-05-19 17:01:09 -0400
commit29130d0c12bd8ba64e9ca7003e817e46a54d8c4e (patch)
tree0ac46e3644df159630e084d585b6c46b57c5e921 /s/strategy.cpp
parentf72751fd2efe21adca8ae2dcc1405a99ab3ded8d (diff)
downloadmongo-29130d0c12bd8ba64e9ca7003e817e46a54d8c4e.tar.gz
make client -> mongod connection static SERVER-956
Diffstat (limited to 's/strategy.cpp')
-rw-r--r--s/strategy.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/s/strategy.cpp b/s/strategy.cpp
index 5ecbb596d4f..dae2419ccfc 100644
--- a/s/strategy.cpp
+++ b/s/strategy.cpp
@@ -31,6 +31,8 @@ namespace mongo {
ShardConnection dbcon( shard );
DBClientBase &_c = dbcon.conn();
+ checkShardVersion( _c , r.getns() );
+
/* TODO FIX - do not case and call DBClientBase::say() */
DBClientConnection&c = dynamic_cast<DBClientConnection&>(_c);
c.port().say( r.m() );
@@ -184,6 +186,7 @@ namespace mongo {
if ( sequenceNumber == officialSequenceNumber )
return;
+ printStackTrace();
log(2) << " have to set shard version for conn: " << &conn << " ns:" << ns
<< " my last seq: " << sequenceNumber << " current: " << officialSequenceNumber
<< " version: " << version << " manager: " << manager
@@ -229,7 +232,7 @@ namespace mongo {
}
bool lockNamespaceOnServer( const Shard& shard, const string& ns ){
- ShardConnection conn( shard );
+ ScopedDbConnection conn( shard.getConnString() );
bool res = lockNamespaceOnServer( conn.conn() , ns );
conn.done();
return res;