diff --git a/db/dbwebserver.cpp b/db/dbwebserver.cpp index 845107ef2a5..15169ebf4db 100644 --- a/db/dbwebserver.cpp +++ b/db/dbwebserver.cpp @@ -438,14 +438,12 @@ namespace mongo { } if( startsWith(url, "/_replSet") ) { - DEV log() << "TEMP /_replSet" << endl; string s = str::after(url, "/_replSetOplog?"); if( !s.empty() ) responseMsg = _replSetOplog(s); else responseMsg = _replSet(); responseCode = 200; - DEV log() << "TEMP /_replSet done" << endl; return; } diff --git a/db/repl/heartbeat.cpp b/db/repl/heartbeat.cpp index 7840e67cf63..1920801364f 100644 --- a/db/repl/heartbeat.cpp +++ b/db/repl/heartbeat.cpp @@ -59,7 +59,11 @@ namespace mongo { result.append("mismatch", true); return false; } + result.append("rs", true); + if( cmdObj["checkEmpty"].trueValue() ) { + result.append("hasData", haveDatabases()); + } if( theReplSet == 0 ) { errmsg = "still initializing"; return false; @@ -77,9 +81,7 @@ namespace mongo { result.append("v", v); if( v > cmdObj["v"].Int() ) result << "config" << theReplSet->config().asBson(); - if( cmdObj["checkEmpty"].trueValue() ) { - result.append("hasData", haveDatabases()); - } + return true; } } cmdReplSetHeartbeat; diff --git a/db/repl/rs_config.cpp b/db/repl/rs_config.cpp index e64b4e5bbdd..9ac5ca933d2 100644 --- a/db/repl/rs_config.cpp +++ b/db/repl/rs_config.cpp @@ -168,8 +168,10 @@ namespace mongo { } catch(...) { throw "bad or missing host field?"; } m.arbiterOnly = mobj.getBoolField("arbiterOnly"); - try { m.priority = mobj["priority"].Number(); } catch(...) { } - try { m.votes = (unsigned) mobj["votes"].Number(); } catch(...) { } + if( mobj.hasElement("priority") ) + m.priority = mobj["priority"].Number(); + if( mobj.hasElement("votes") ) + m.votes = (unsigned) mobj["votes"].Number(); m.check(); } catch( const char * p ) { @@ -237,7 +239,6 @@ namespace mongo { { stringstream ss; ss << "replSet error: member " << h.toString() << " is not in --replSet mode"; - cout << "TEMP " << info.toString() << endl; msgassertedNoTrace(13260, ss.str().c_str()); // not caught as not a user exception - we want it not caught //for python err# checker: uassert(13260, "", false); } diff --git a/db/repl/rs_initiate.cpp b/db/repl/rs_initiate.cpp index b6e0a2e279c..0b53b40fae5 100644 --- a/db/repl/rs_initiate.cpp +++ b/db/repl/rs_initiate.cpp @@ -80,7 +80,7 @@ namespace mongo { virtual bool run(const string& , BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl) { log() << "replSet replSetInitiate admin command received from client" << rsLog; - if( 0 ) { + if( 1 ) { // just make sure we can get a write lock before doing anything else. we'll reacquire one // later. of course it could be stuck then, but this check lowers the risk if weird things // are up. @@ -108,7 +108,7 @@ namespace mongo { } if( ReplSet::startupStatus != ReplSet::EMPTYCONFIG ) { result.append("startupStatus", ReplSet::startupStatus); - result.append("startupStatusMsg", ReplSet::startupStatusMsg); + //result.append("startupStatusMsg", ReplSet::startupStatusMsg); errmsg = "all members and seeds must be reachable to initiate set"; result.append("info", cmdLine.replSet); return false; diff --git a/db/repl/test.html b/db/repl/test.html index ed8654198f5..295ad2ef0e0 100644 --- a/db/repl/test.html +++ b/db/repl/test.html @@ -1,8 +1,11 @@
+ + - - + diff --git a/shell/shell_utils.cpp b/shell/shell_utils.cpp index 2407549a66a..f06f96e8db8 100644 --- a/shell/shell_utils.cpp +++ b/shell/shell_utils.cpp @@ -488,7 +488,7 @@ namespace mongo { pid_ = pi.dwProcessId; handles.insert( make_pair( pid_, pi.hProcess ) ); - + #else pid_ = fork();