Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6451

weAreFreshest() can report all members are up if no targets are reported by rs.getTargets()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.6
    • Component/s: Replication
    • Labels:
    • ALL

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            benjamin.becker Ben Becker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: