mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-29 16:47:28 +01:00
reload option for getShardManager
This commit is contained in:
parent
d58828ebb0
commit
d417bc0802
@ -72,9 +72,9 @@ namespace mongo {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ShardManager* DBConfig::getShardManager( const string& ns ){
|
ShardManager* DBConfig::getShardManager( const string& ns , bool reload ){
|
||||||
ShardManager* m = _shards[ns];
|
ShardManager* m = _shards[ns];
|
||||||
if ( m )
|
if ( m && ! reload )
|
||||||
return m;
|
return m;
|
||||||
|
|
||||||
uassert( (string)"not sharded:" + ns , sharded( ns ) );
|
uassert( (string)"not sharded:" + ns , sharded( ns ) );
|
||||||
|
@ -62,7 +62,7 @@ namespace mongo {
|
|||||||
*/
|
*/
|
||||||
bool sharded( const string& ns );
|
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
|
* @return the correct for machine for the ns
|
||||||
|
Loading…
Reference in New Issue
Block a user