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

Consider not bailing when Manager::msgCheckNewState notices two other primaries transiently

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.6.5
    • Component/s: Replication
    • None

      In Manager::msgCheckNewState, if findOtherPrimary finds that two other members think they are primary, the method returns without having done anything. I think in the (unlikely) case where there are > 2 primaries, this may be problematic.

      If there are > 2 primaries, each primary will notice that at least 2 other primaries exist (by having bool two set to true when calling findOtherPrimary), and bail. As a result, no primary steps down.

      Instead, perhaps the function should continue, and noteARemoteIsPrimary should loop through all members checking if there is any primary with a more recent election time, and step down if that is the case. msgCheckNewState will then return anyway given that a primary exists.

      I realize that with the 30 second election timer, having > 2 primaries is incredibly difficult, but if the timer is removed this issue may become more likely.

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            zardosht Zardosht Kasheff
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: