remove a couple unnecessary locks
This commit is contained in:
@@ -359,7 +359,6 @@ namespace mongo {
|
||||
multiCommand(electCmd, L);
|
||||
|
||||
{
|
||||
RSBase::lock lk(&rs);
|
||||
for( list<Target>::iterator i = L.begin(); i != L.end(); i++ ) {
|
||||
DEV log() << "replSet elect res: " << i->result.toString() << rsLog;
|
||||
if( i->ok ) {
|
||||
|
||||
@@ -346,10 +346,7 @@ namespace mongo {
|
||||
}
|
||||
|
||||
const Member* ReplSetImpl::findById(unsigned id) const {
|
||||
{
|
||||
lock lk((RSBase*)this);
|
||||
if( _self && id == _self->id() ) return _self;
|
||||
}
|
||||
if( _self && id == _self->id() ) return _self;
|
||||
|
||||
for( Member *m = head(); m; m = m->next() )
|
||||
if( m->id() == id )
|
||||
|
||||
Reference in New Issue
Block a user