summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-08-04 16:02:49 -0400
committerEliot Horowitz <eliot@10gen.com>2010-08-04 16:03:32 -0400
commite4fcc800f73e641854697fa63b684d7e7d7064ed (patch)
treed84ec77b0dc35658bb808b1ecd3152cb8c77a7e4
parent7abf0580caff987caac8e8d7b1dad8c44dccfcab (diff)
downloadmongo-e4fcc800f73e641854697fa63b684d7e7d7064ed.tar.gz
fix serverStatus for replica sets SERVER-1570
-rw-r--r--db/repl.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/db/repl.cpp b/db/repl.cpp
index f0bd02f4cd8..8cdd5454dad 100644
--- a/db/repl.cpp
+++ b/db/repl.cpp
@@ -290,11 +290,13 @@ namespace mongo {
}
}
else {
- result.append("ismaster", replSettings.master || replSettings.slave == 0 ? 1 : 0);
- //result.append("msg", "not paired");
+ result.appendBool("ismaster", _isMaster() );
}
-
- if ( level ){
+
+ if ( level && replSet ){
+ result.append( "info" , "is replica set" );
+ }
+ else if ( level ){
BSONObjBuilder sources( result.subarrayStart( "sources" ) );
readlock lk( "local.sources" );