Skip to content

Commit

Permalink
Log when a member can't elect themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
kchodorow committed Oct 6, 2011
1 parent 1f8f805 commit 9ee9036
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions db/repl/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ namespace mongo {
return;
}

if( !rs->iAmPotentiallyHot() ) // if not we never try to be primary
if( !rs->iAmPotentiallyHot() ) { // if not we never try to be primary
OCCASIONALLY log() << "replSet I don't see a primary and I can't elect myself" << endl;
return;

}

/* no one seems to be primary. shall we try to elect ourself? */
if( !rs->elect.aMajoritySeemsToBeUp() ) {
static time_t last;
Expand Down

0 comments on commit 9ee9036

Please sign in to comment.