Skip to content
Browse files

clarify error message. in mongos if you get this message it's pretty …

…unclear as a user what is wrong. added the lists of hosts for the clusterconnection so you know what specifically is down. ideally we would say 'all config servers down: their_names' if that is what is wrong as that would be clearer but that would go somewhere up the stack so this is still suboptimal but an improvement.'
  • Loading branch information...
1 parent a63b87a commit cd68b47b2fdeae382ce82754f7541b4467ce03c8 @dwight dwight committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/mongo/client/syncclusterconnection.cpp
View
4 src/mongo/client/syncclusterconnection.cpp
@@ -331,7 +331,7 @@ namespace mongo {
log() << "query failed to: " << _conns[i]->toString() << " exception" << endl;
}
}
- throw UserException( 8002 , "all servers down!" );
+ throw UserException( 8002 , str::stream() << "all servers down/unreachable when querying: " << _address );
}
auto_ptr<DBClientCursor> SyncClusterConnection::getMore( const string &ns, long long cursorId, int nToReturn, int options ) {
@@ -444,7 +444,7 @@ namespace mongo {
log() << "call failed to: " << _conns[i]->toString() << " exception" << endl;
}
}
- throw UserException( 8008 , "all servers down!" );
+ throw UserException( 8008 , str::stream() << "all servers down/unreachable: " << _address );
}
void SyncClusterConnection::say( Message &toSend, bool isRetry , string * actualServer ) {

0 comments on commit cd68b47

Please sign in to comment.
Something went wrong with that request. Please try again.