mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
when using rs as a shard, only name matters
This commit is contained in:
parent
61ab457c34
commit
f6141d9bac
@ -64,7 +64,7 @@ namespace mongo {
|
||||
void enable( const string& server );
|
||||
|
||||
void gotShardName( const string& name );
|
||||
void gotShardHost( const string& host );
|
||||
void gotShardHost( string host );
|
||||
|
||||
bool hasVersion( const string& ns );
|
||||
bool hasVersion( const string& ns , ConfigVersion& version );
|
||||
|
@ -76,7 +76,12 @@ namespace mongo {
|
||||
uasserted( 13298 , ss.str() );
|
||||
}
|
||||
|
||||
void ShardingState::gotShardHost( const string& host ){
|
||||
void ShardingState::gotShardHost( string host ){
|
||||
|
||||
size_t slash = host.find( '/' );
|
||||
if ( slash != string::npos )
|
||||
host = host.substr( 0 , slash );
|
||||
|
||||
if ( _shardHost.size() == 0 ){
|
||||
_shardHost = host;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user