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

repl set primary won't elect itself is a secondary is fresher

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

      a replica set primary will not elect itself if a secondary is fresher. this is a "legal" situation so we must handle.

      currently it says:

      Mon Nov 29 16:33:34 [rs Manager] replSet info not electing self, we are not freshest

      so what to do. perhaps:

      (1) take over even if not freshest if the time gap or # of operations gap is small. the secondary will then roll back (we'll need to test this). when this happens, log the optimes so the operator knows what is up.
      (2) if the gap is larger, do what it does now, however, log more on the size of the gap. and we can have an override that says "take over anyway"

      easy to reproduce, i just tried.

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            dwight@mongodb.com Dwight Merriman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: