diff --git a/db/commands/cloud.cpp b/db/commands/cloud.cpp index 6a282a9fa7b..6ce061b72bc 100644 --- a/db/commands/cloud.cpp +++ b/db/commands/cloud.cpp @@ -10,7 +10,8 @@ namespace mongo { /** { cloud:1, nodes: { name : , ... - } + }, + me : } */ class CmdCloud : public Command { diff --git a/dbtests/threadedtests.cpp b/dbtests/threadedtests.cpp index a3133eef0ae..3794c4c857f 100644 --- a/dbtests/threadedtests.cpp +++ b/dbtests/threadedtests.cpp @@ -530,7 +530,7 @@ namespace ThreadedTests { log() << x << ' ' << ch << " got " << endl; if( what[x] == 'R' ) { if( t.millis() > 15 ) { - log() << "warning: when in upgradable write locks are still greedy on this platform" << endl; + log() << x << " warning: when in upgradable, write locks are still greedy on this platform" << endl; } } sleepmillis(200); diff --git a/util/net/sock.cpp b/util/net/sock.cpp index 89b67c27b8d..fe85269c651 100644 --- a/util/net/sock.cpp +++ b/util/net/sock.cpp @@ -140,10 +140,11 @@ namespace mongo { SockAddr::SockAddr(const char * _iporhost , int port) { string target = _iporhost; + bool cloudName = *_iporhost == '#'; if( target == "localhost" ) { target = "127.0.0.1"; } - else if( *_iporhost == '#' ) { + else if( cloudName ) { target = dynHostNames.get(target); } @@ -175,15 +176,15 @@ namespace mongo { #else int nodata = false; #endif - if (ret == EAI_NONAME || nodata) { + if ( (ret == EAI_NONAME || nodata) && !cloudName ) { // iporhost isn't an IP address, allow DNS lookup hints.ai_flags &= ~AI_NUMERICHOST; ret = getaddrinfo(target.c_str(), ss.str().c_str(), &hints, &addrs); } if (ret) { - // don't log if this as it is a CRT construction and log() may not work yet. - if( target != "0.0.0.0" ) { + // we were unsuccessful + if( target != "0.0.0.0" ) { // don't log if this as it is a CRT construction and log() may not work yet. log() << "getaddrinfo(\"" << target << "\") failed: " << gai_strerror(ret) << endl; } *this = SockAddr(port);