From d417bc0802cded247072ed05fb6b73b998aa7ef0 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Thu, 26 Mar 2009 17:33:30 -0400 Subject: [PATCH] reload option for getShardManager --- s/config.cpp | 4 ++-- s/config.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/s/config.cpp b/s/config.cpp index 7ffeb8ca409..69dbc2efc99 100644 --- a/s/config.cpp +++ b/s/config.cpp @@ -72,9 +72,9 @@ namespace mongo { } - ShardManager* DBConfig::getShardManager( const string& ns ){ + ShardManager* DBConfig::getShardManager( const string& ns , bool reload ){ ShardManager* m = _shards[ns]; - if ( m ) + if ( m && ! reload ) return m; uassert( (string)"not sharded:" + ns , sharded( ns ) ); diff --git a/s/config.h b/s/config.h index 798cc007803..effe66aba65 100644 --- a/s/config.h +++ b/s/config.h @@ -62,7 +62,7 @@ namespace mongo { */ bool sharded( const string& ns ); - ShardManager* getShardManager( const string& ns ); + ShardManager* getShardManager( const string& ns , bool reload = false ); /** * @return the correct for machine for the ns