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

Stepdown hook needs to handle stepup race

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2023-03-06
    • 0

      It appears the continuous stepdown hook can get in a situation where

      1) It steps up a secondary.

      2) The secondary becomes primary, but is slow to get all the way to writable primary (e.g. due to catch-up)

      3) The hook steps up another secondary

      4) Election fails

      5) The hook goes to step up the original primary, which is fine (it's already primary).

      6) The primary finishes catch-up, and steps down due to the term change.

      7) We're now without a primary until election timeout expires. (very bad with high election timeout).

      We should also add logging to the hook so all these steps are visible.

            Assignee:
            jiawei.yang@mongodb.com Jiawei Yang
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: