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:
parent
d927c4f1bc
commit
8f4624a917
@ -277,6 +277,7 @@ namespace mongo {
|
||||
result.append("ismaster", false);
|
||||
result.append("secondary", false);
|
||||
result.append("info", ReplSet::startupStatusMsg);
|
||||
result.append( "isreplicaset" , true );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -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() );
|
||||
|
Loading…
Reference in New Issue
Block a user