default to using rsGetStatus for slaveReplInfo SERVER-3376
This commit is contained in:
@@ -2440,13 +2440,14 @@ const StringData _jscode_raw_db =
|
||||
"};\n"
|
||||
"\n"
|
||||
"var L = this.getSiblingDB(\"local\");\n"
|
||||
"if( L.sources.count() != 0 ) {\n"
|
||||
"L.sources.find().forEach(g);\n"
|
||||
"}\n"
|
||||
"else if (L.system.replset.count() != 0) {\n"
|
||||
"\n"
|
||||
"if (L.system.replset.count() != 0) {\n"
|
||||
"var status = this.adminCommand({'replSetGetStatus' : 1});\n"
|
||||
"status.members.forEach(r);\n"
|
||||
"}\n"
|
||||
"else if( L.sources.count() != 0 ) {\n"
|
||||
"L.sources.find().forEach(g);\n"
|
||||
"}\n"
|
||||
"else {\n"
|
||||
"print(\"local.sources is empty; is this db a --slave?\");\n"
|
||||
"return;\n"
|
||||
|
||||
Reference in New Issue
Block a user