0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

reload option for getShardManager

This commit is contained in:
Eliot Horowitz 2009-03-26 17:33:30 -04:00
parent d58828ebb0
commit d417bc0802
2 changed files with 3 additions and 3 deletions

View File

@ -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 ) );

View File

@ -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