[SERVER-6451] weAreFreshest() can report all members are up if no targets are reported by rs.getTargets() Created: 15/Jul/12  Updated: 10/Dec/14  Resolved: 19/Sep/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ben Becker Assignee: Unassigned
Resolution: Done Votes: 0
Labels: elections
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

The following message was observed just 49 seconds after mongod started:

Sat Jul 14 15:49:09 [MultiCommandJob] DBClientCursor::init call() failed
Sat Jul 14 15:49:09 [rsMgr] replSet not electing self, not all members up and we have been up less than 5 minutes
Sat Jul 14 15:49:09 [rsMgr] replSet info electSelf 4
Sat Jul 14 15:49:09 [rsMgr] replSet PRIMARY

electSelf shouldn't proceed unless more than 5 minutes has elapsed, so one of two conditions must have occured:

  1. The static initialization of time_t started = time(0) failed (seems unlikely given other log output).
  2. weAreFreshest() set allUp to true and returned true, which would be the case any time rs.getTargets(L, ver) returns no Targets.


 Comments   
Comment by Eric Milkie [ 19/Sep/14 ]

The offending code points have been rewritten.

Generated at Thu Feb 08 03:11:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.