summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/health.cpp
diff options
context:
space:
mode:
authorMatt Dannenberg <matt.dannenberg@10gen.com>2013-06-29 21:58:07 -0400
committerMatt Dannenberg <matt.dannenberg@10gen.com>2013-06-29 22:32:38 -0400
commit83ecb9775b7997dd5115c53f6ea30d2e368a4244 (patch)
tree51f3a6cc6664bf9601f0bef9247bbf08643c7391 /src/mongo/db/repl/health.cpp
parentbabd275f88181c3f2cd29585816aab24bc4b421c (diff)
downloadmongo-83ecb9775b7997dd5115c53f6ea30d2e368a4244.tar.gz
SERVER-6071 use command on local.slaves instead of cursor
Diffstat (limited to 'src/mongo/db/repl/health.cpp')
-rw-r--r--src/mongo/db/repl/health.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/repl/health.cpp b/src/mongo/db/repl/health.cpp
index 55fd017ca98..1fa974d6889 100644
--- a/src/mongo/db/repl/health.cpp
+++ b/src/mongo/db/repl/health.cpp
@@ -349,6 +349,15 @@ namespace mongo {
return 0;
}
+ Member* ReplSetImpl::getMutableMember(unsigned id) {
+ if( _self && id == _self->id() ) return _self;
+
+ for( Member *m = head(); m; m = m->next() )
+ if( m->id() == id )
+ return m;
+ return 0;
+ }
+
Member* ReplSetImpl::findByName(const std::string& hostname) const {
if (_self && hostname == _self->fullName()) {
return _self;