0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

easier auto detection of replica set status from ismaster

This commit is contained in:
Eliot Horowitz 2010-10-24 10:36:38 -04:00
parent d927c4f1bc
commit 8f4624a917
2 changed files with 4 additions and 1 deletions

View File

@ -277,6 +277,7 @@ namespace mongo {
result.append("ismaster", false);
result.append("secondary", false);
result.append("info", ReplSet::startupStatusMsg);
result.append( "isreplicaset" , true );
return;
}

View File

@ -208,9 +208,11 @@ namespace mongo {
ss << "M";
else if ( x["secondary"].trueValue() )
ss << "SEC";
else if ( x["isreplicaset"].trueValue() )
ss << "REC";
else if ( isReplSet )
ss << "UNK";
else
else
ss << "SLV";
_append( result , "repl" , 4 , ss.str() );