diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-08-04 16:02:49 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-08-04 16:03:32 -0400 |
commit | e4fcc800f73e641854697fa63b684d7e7d7064ed (patch) | |
tree | d84ec77b0dc35658bb808b1ecd3152cb8c77a7e4 | |
parent | 7abf0580caff987caac8e8d7b1dad8c44dccfcab (diff) | |
download | mongo-e4fcc800f73e641854697fa63b684d7e7d7064ed.tar.gz |
fix serverStatus for replica sets SERVER-1570
-rw-r--r-- | db/repl.cpp | 10 |
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" ); |