summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-05-01 11:21:34 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2015-05-01 11:21:36 -0400
commitbab08433794c50bd96b2fb8558075a14a5a075b2 (patch)
treea1e5c3a5a73f97ffc7e68eb2f6d32794902f90b5 /src
parent7993382d5c71f2bdf90cb84271f59c1d9d713789 (diff)
downloadmongo-bab08433794c50bd96b2fb8558075a14a5a075b2.tar.gz
SERVER-13542 Expose electionId on primary in isMaster
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/repl/rs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/repl/rs.cpp b/src/mongo/db/repl/rs.cpp
index 4676860205f..c7f603be8c2 100644
--- a/src/mongo/db/repl/rs.cpp
+++ b/src/mongo/db/repl/rs.cpp
@@ -383,6 +383,9 @@ namespace {
b.append("tags", a.done());
}
b.append("me", myConfig().h.toString());
+ if (isp) {
+ b.append("electionId", getElectionId());
+ }
}
/** @param cfgString <setname>/<seedhost1>,<seedhost2> */