diff options
author | Matt Dannenberg <matt.dannenberg@10gen.com> | 2013-06-29 21:58:07 -0400 |
---|---|---|
committer | Matt Dannenberg <matt.dannenberg@10gen.com> | 2013-06-29 22:32:38 -0400 |
commit | 83ecb9775b7997dd5115c53f6ea30d2e368a4244 (patch) | |
tree | 51f3a6cc6664bf9601f0bef9247bbf08643c7391 /src/mongo/db/repl/health.cpp | |
parent | babd275f88181c3f2cd29585816aab24bc4b421c (diff) | |
download | mongo-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.cpp | 9 |
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; |